# Generated from HogQLParser.g4 by ANTLR 4.13.2
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
	from typing import TextIO
else:
	from typing.io import TextIO

def serializedATN():
    return [
        4,1,168,1343,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,
        7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,
        13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,
        20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,
        26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,
        33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,
        39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,
        46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,
        52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7,58,2,
        59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7,
        65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7,71,2,
        72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2,78,7,
        78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2,
        85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,1,0,5,
        0,184,8,0,10,0,12,0,187,9,0,1,0,1,0,1,1,1,1,3,1,193,8,1,1,2,1,2,
        1,3,1,3,1,3,1,3,1,3,3,3,202,8,3,1,4,1,4,1,4,5,4,207,8,4,10,4,12,
        4,210,9,4,1,4,3,4,213,8,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,
        5,1,5,1,5,3,5,227,8,5,1,6,1,6,3,6,231,8,6,1,6,3,6,234,8,6,1,7,1,
        7,3,7,238,8,7,1,7,3,7,241,8,7,1,8,1,8,1,8,1,8,1,8,3,8,248,8,8,1,
        8,1,8,3,8,252,8,8,1,8,1,8,1,9,1,9,1,9,5,9,259,8,9,10,9,12,9,262,
        9,9,1,9,1,9,3,9,266,8,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,3,10,
        275,8,10,1,11,1,11,1,11,1,11,1,11,1,11,3,11,283,8,11,1,12,1,12,1,
        12,1,12,1,12,3,12,290,8,12,1,12,1,12,3,12,294,8,12,1,12,1,12,1,12,
        1,12,3,12,300,8,12,1,12,1,12,1,12,3,12,305,8,12,1,13,1,13,1,13,1,
        13,1,13,1,13,3,13,313,8,13,1,13,1,13,1,13,1,13,1,13,3,13,320,8,13,
        1,14,1,14,1,14,1,14,3,14,326,8,14,1,14,1,14,1,14,1,15,1,15,1,15,
        1,15,1,15,1,16,1,16,3,16,338,8,16,1,17,1,17,1,18,1,18,5,18,344,8,
        18,10,18,12,18,347,9,18,1,18,1,18,1,19,1,19,1,19,1,19,1,20,1,20,
        1,20,5,20,358,8,20,10,20,12,20,361,9,20,1,20,3,20,364,8,20,1,21,
        1,21,1,21,3,21,369,8,21,1,21,3,21,372,8,21,1,21,1,21,1,22,1,22,1,
        22,1,22,1,22,1,22,3,22,382,8,22,1,23,1,23,1,23,1,23,1,23,1,23,1,
        23,1,23,3,23,392,8,23,1,23,1,23,1,24,1,24,5,24,398,8,24,10,24,12,
        24,401,9,24,1,25,3,25,404,8,25,1,25,1,25,3,25,408,8,25,1,25,3,25,
        411,8,25,1,25,1,25,3,25,415,8,25,1,25,3,25,418,8,25,1,25,3,25,421,
        8,25,1,25,3,25,424,8,25,1,25,3,25,427,8,25,1,25,1,25,3,25,431,8,
        25,1,25,1,25,3,25,435,8,25,1,25,3,25,438,8,25,1,25,3,25,441,8,25,
        1,25,3,25,444,8,25,1,25,3,25,447,8,25,1,25,1,25,3,25,451,8,25,1,
        25,3,25,454,8,25,1,26,1,26,1,26,1,27,1,27,1,27,1,27,3,27,463,8,27,
        1,28,1,28,1,28,1,29,3,29,469,8,29,1,29,1,29,1,29,1,29,1,30,1,30,
        1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,5,30,488,
        8,30,10,30,12,30,491,9,30,1,31,1,31,1,31,1,32,1,32,1,32,1,33,1,33,
        1,33,1,33,1,33,1,33,1,33,1,33,3,33,507,8,33,1,34,1,34,1,34,1,35,
        1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,38,
        1,38,1,38,1,38,3,38,529,8,38,1,38,1,38,3,38,533,8,38,1,38,1,38,1,
        38,1,38,3,38,539,8,38,1,38,1,38,1,38,3,38,544,8,38,1,39,1,39,1,39,
        1,40,1,40,1,40,1,41,1,41,1,41,3,41,555,8,41,1,41,3,41,558,8,41,1,
        41,1,41,1,41,1,41,3,41,564,8,41,1,41,1,41,1,41,1,41,1,41,1,41,3,
        41,572,8,41,1,41,1,41,1,41,1,41,5,41,578,8,41,10,41,12,41,581,9,
        41,1,42,3,42,584,8,42,1,42,1,42,1,42,3,42,589,8,42,1,42,3,42,592,
        8,42,1,42,3,42,595,8,42,1,42,1,42,3,42,599,8,42,1,42,1,42,3,42,603,
        8,42,1,42,3,42,606,8,42,3,42,608,8,42,1,42,3,42,611,8,42,1,42,1,
        42,3,42,615,8,42,1,42,1,42,3,42,619,8,42,1,42,3,42,622,8,42,3,42,
        624,8,42,3,42,626,8,42,1,43,1,43,1,43,3,43,631,8,43,1,44,1,44,1,
        44,1,44,1,44,1,44,1,44,1,44,1,44,3,44,642,8,44,1,45,1,45,1,45,1,
        45,3,45,648,8,45,1,46,1,46,1,46,3,46,653,8,46,1,47,1,47,1,47,5,47,
        658,8,47,10,47,12,47,661,9,47,1,48,1,48,3,48,665,8,48,1,48,1,48,
        3,48,669,8,48,1,48,1,48,3,48,673,8,48,1,49,1,49,1,49,1,49,3,49,679,
        8,49,3,49,681,8,49,1,50,1,50,1,50,5,50,686,8,50,10,50,12,50,689,
        9,50,1,51,1,51,1,51,1,51,1,52,3,52,696,8,52,1,52,3,52,699,8,52,1,
        52,3,52,702,8,52,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,55,1,
        55,1,55,1,56,1,56,1,56,1,56,1,56,1,56,3,56,721,8,56,1,57,1,57,1,
        57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,3,57,735,8,57,1,
        58,1,58,1,58,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,5,59,749,
        8,59,10,59,12,59,752,9,59,1,59,3,59,755,8,59,1,59,1,59,1,59,1,59,
        1,59,1,59,1,59,5,59,764,8,59,10,59,12,59,767,9,59,1,59,3,59,770,
        8,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,5,59,779,8,59,10,59,12,59,
        782,9,59,1,59,3,59,785,8,59,1,59,1,59,1,59,1,59,1,59,3,59,792,8,
        59,1,59,1,59,3,59,796,8,59,1,60,1,60,1,60,5,60,801,8,60,10,60,12,
        60,804,9,60,1,60,3,60,807,8,60,1,61,1,61,1,61,3,61,812,8,61,1,61,
        1,61,1,61,1,61,1,61,4,61,819,8,61,11,61,12,61,820,1,61,1,61,3,61,
        825,8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
        1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
        3,61,851,8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
        1,61,1,61,1,61,1,61,1,61,3,61,868,8,61,1,61,1,61,1,61,1,61,3,61,
        874,8,61,1,61,3,61,877,8,61,1,61,3,61,880,8,61,1,61,1,61,1,61,1,
        61,1,61,1,61,1,61,1,61,3,61,890,8,61,1,61,1,61,1,61,1,61,3,61,896,
        8,61,1,61,3,61,899,8,61,1,61,3,61,902,8,61,1,61,1,61,1,61,1,61,1,
        61,1,61,3,61,910,8,61,1,61,3,61,913,8,61,1,61,1,61,3,61,917,8,61,
        1,61,3,61,920,8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
        1,61,1,61,1,61,3,61,934,8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
        1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,951,8,61,1,61,1,61,
        1,61,3,61,956,8,61,1,61,1,61,1,61,3,61,961,8,61,1,61,1,61,1,61,1,
        61,3,61,967,8,61,1,61,1,61,1,61,1,61,1,61,3,61,974,8,61,1,61,1,61,
        1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,986,8,61,1,61,1,61,
        3,61,990,8,61,1,61,3,61,993,8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,
        61,3,61,1002,8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,
        61,1,61,1,61,3,61,1016,8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,
        61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,1037,
        8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
        1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
        1,61,1,61,3,61,1066,8,61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,1074,
        8,61,5,61,1076,8,61,10,61,12,61,1079,9,61,1,62,1,62,1,62,1,62,5,
        62,1085,8,62,10,62,12,62,1088,9,62,1,62,3,62,1091,8,62,1,62,1,62,
        1,62,1,62,1,62,5,62,1098,8,62,10,62,12,62,1101,9,62,1,62,3,62,1104,
        8,62,1,62,1,62,3,62,1108,8,62,1,62,1,62,1,62,3,62,1113,8,62,1,63,
        1,63,1,63,1,63,1,63,1,63,3,63,1121,8,63,1,64,1,64,1,65,1,65,1,65,
        5,65,1128,8,65,10,65,12,65,1131,9,65,1,65,1,65,1,65,1,65,1,65,5,
        65,1138,8,65,10,65,12,65,1141,9,65,1,65,1,65,5,65,1145,8,65,10,65,
        12,65,1148,9,65,1,65,1,65,1,65,1,65,3,65,1154,8,65,1,66,1,66,1,66,
        1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,3,66,1167,8,66,1,67,1,67,
        1,67,5,67,1172,8,67,10,67,12,67,1175,9,67,1,67,3,67,1178,8,67,1,
        68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,3,68,1190,8,68,1,
        69,1,69,1,69,1,69,3,69,1196,8,69,1,69,3,69,1199,8,69,1,70,1,70,1,
        70,5,70,1204,8,70,10,70,12,70,1207,9,70,1,71,1,71,1,71,1,71,1,71,
        1,71,1,71,1,71,1,71,3,71,1218,8,71,1,71,1,71,1,71,1,71,3,71,1224,
        8,71,5,71,1226,8,71,10,71,12,71,1229,9,71,1,72,1,72,1,72,3,72,1234,
        8,72,1,72,1,72,1,73,1,73,1,73,3,73,1241,8,73,1,73,1,73,1,74,1,74,
        1,74,5,74,1248,8,74,10,74,12,74,1251,9,74,1,74,3,74,1254,8,74,1,
        75,1,75,1,76,1,76,1,76,1,76,1,76,1,76,3,76,1264,8,76,3,76,1266,8,
        76,1,77,3,77,1269,8,77,1,77,1,77,1,77,1,77,1,77,1,77,3,77,1277,8,
        77,1,78,1,78,1,78,3,78,1282,8,78,1,79,1,79,1,80,1,80,1,81,1,81,1,
        82,1,82,3,82,1292,8,82,1,83,1,83,1,83,3,83,1297,8,83,1,84,1,84,1,
        84,1,84,1,85,1,85,1,85,1,85,1,86,1,86,3,86,1309,8,86,1,87,1,87,5,
        87,1313,8,87,10,87,12,87,1316,9,87,1,87,1,87,1,88,1,88,1,88,1,88,
        1,88,3,88,1325,8,88,1,89,1,89,5,89,1329,8,89,10,89,12,89,1332,9,
        89,1,89,1,89,1,90,1,90,1,90,1,90,1,90,3,90,1341,8,90,1,90,0,3,82,
        122,142,91,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,
        40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,
        84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,
        120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,
        152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,0,18,
        2,0,32,32,37,37,2,0,18,18,77,77,2,0,46,46,54,54,3,0,1,1,4,4,8,8,
        4,0,1,1,3,4,8,8,83,83,2,0,54,54,76,76,2,0,1,1,4,4,2,0,64,64,119,
        119,2,0,7,7,22,23,2,0,31,31,52,52,2,0,74,74,79,79,3,0,10,10,53,53,
        93,93,2,0,43,43,56,56,1,0,110,111,2,0,121,121,143,143,7,0,21,21,
        40,40,58,59,73,73,81,81,100,100,106,106,19,0,1,13,15,20,22,26,28,
        29,31,31,33,36,38,39,41,44,46,46,48,54,56,57,61,61,63,72,74,80,82,
        86,88,95,97,99,101,102,104,105,4,0,20,20,31,31,41,41,51,51,1517,
        0,185,1,0,0,0,2,192,1,0,0,0,4,194,1,0,0,0,6,196,1,0,0,0,8,203,1,
        0,0,0,10,226,1,0,0,0,12,228,1,0,0,0,14,235,1,0,0,0,16,242,1,0,0,
        0,18,255,1,0,0,0,20,267,1,0,0,0,22,276,1,0,0,0,24,284,1,0,0,0,26,
        306,1,0,0,0,28,321,1,0,0,0,30,330,1,0,0,0,32,335,1,0,0,0,34,339,
        1,0,0,0,36,341,1,0,0,0,38,350,1,0,0,0,40,354,1,0,0,0,42,368,1,0,
        0,0,44,381,1,0,0,0,46,391,1,0,0,0,48,395,1,0,0,0,50,403,1,0,0,0,
        52,455,1,0,0,0,54,458,1,0,0,0,56,464,1,0,0,0,58,468,1,0,0,0,60,474,
        1,0,0,0,62,492,1,0,0,0,64,495,1,0,0,0,66,498,1,0,0,0,68,508,1,0,
        0,0,70,511,1,0,0,0,72,515,1,0,0,0,74,519,1,0,0,0,76,543,1,0,0,0,
        78,545,1,0,0,0,80,548,1,0,0,0,82,563,1,0,0,0,84,625,1,0,0,0,86,630,
        1,0,0,0,88,641,1,0,0,0,90,643,1,0,0,0,92,649,1,0,0,0,94,654,1,0,
        0,0,96,662,1,0,0,0,98,680,1,0,0,0,100,682,1,0,0,0,102,690,1,0,0,
        0,104,695,1,0,0,0,106,703,1,0,0,0,108,707,1,0,0,0,110,711,1,0,0,
        0,112,720,1,0,0,0,114,734,1,0,0,0,116,736,1,0,0,0,118,795,1,0,0,
        0,120,797,1,0,0,0,122,960,1,0,0,0,124,1107,1,0,0,0,126,1120,1,0,
        0,0,128,1122,1,0,0,0,130,1153,1,0,0,0,132,1166,1,0,0,0,134,1168,
        1,0,0,0,136,1189,1,0,0,0,138,1198,1,0,0,0,140,1200,1,0,0,0,142,1217,
        1,0,0,0,144,1230,1,0,0,0,146,1240,1,0,0,0,148,1244,1,0,0,0,150,1255,
        1,0,0,0,152,1265,1,0,0,0,154,1268,1,0,0,0,156,1281,1,0,0,0,158,1283,
        1,0,0,0,160,1285,1,0,0,0,162,1287,1,0,0,0,164,1291,1,0,0,0,166,1296,
        1,0,0,0,168,1298,1,0,0,0,170,1302,1,0,0,0,172,1308,1,0,0,0,174,1310,
        1,0,0,0,176,1324,1,0,0,0,178,1326,1,0,0,0,180,1340,1,0,0,0,182,184,
        3,2,1,0,183,182,1,0,0,0,184,187,1,0,0,0,185,183,1,0,0,0,185,186,
        1,0,0,0,186,188,1,0,0,0,187,185,1,0,0,0,188,189,5,0,0,1,189,1,1,
        0,0,0,190,193,3,6,3,0,191,193,3,10,5,0,192,190,1,0,0,0,192,191,1,
        0,0,0,193,3,1,0,0,0,194,195,3,122,61,0,195,5,1,0,0,0,196,197,5,55,
        0,0,197,201,3,166,83,0,198,199,5,118,0,0,199,200,5,125,0,0,200,202,
        3,4,2,0,201,198,1,0,0,0,201,202,1,0,0,0,202,7,1,0,0,0,203,208,3,
        166,83,0,204,205,5,119,0,0,205,207,3,166,83,0,206,204,1,0,0,0,207,
        210,1,0,0,0,208,206,1,0,0,0,208,209,1,0,0,0,209,212,1,0,0,0,210,
        208,1,0,0,0,211,213,5,119,0,0,212,211,1,0,0,0,212,213,1,0,0,0,213,
        9,1,0,0,0,214,227,3,12,6,0,215,227,3,14,7,0,216,227,3,18,9,0,217,
        227,3,20,10,0,218,227,3,22,11,0,219,227,3,26,13,0,220,227,3,24,12,
        0,221,227,3,28,14,0,222,227,3,30,15,0,223,227,3,36,18,0,224,227,
        3,32,16,0,225,227,3,34,17,0,226,214,1,0,0,0,226,215,1,0,0,0,226,
        216,1,0,0,0,226,217,1,0,0,0,226,218,1,0,0,0,226,219,1,0,0,0,226,
        220,1,0,0,0,226,221,1,0,0,0,226,222,1,0,0,0,226,223,1,0,0,0,226,
        224,1,0,0,0,226,225,1,0,0,0,227,11,1,0,0,0,228,230,5,75,0,0,229,
        231,3,4,2,0,230,229,1,0,0,0,230,231,1,0,0,0,231,233,1,0,0,0,232,
        234,5,154,0,0,233,232,1,0,0,0,233,234,1,0,0,0,234,13,1,0,0,0,235,
        237,5,87,0,0,236,238,3,4,2,0,237,236,1,0,0,0,237,238,1,0,0,0,238,
        240,1,0,0,0,239,241,5,154,0,0,240,239,1,0,0,0,240,241,1,0,0,0,241,
        15,1,0,0,0,242,251,5,14,0,0,243,244,5,133,0,0,244,247,3,166,83,0,
        245,246,5,118,0,0,246,248,3,166,83,0,247,245,1,0,0,0,247,248,1,0,
        0,0,248,249,1,0,0,0,249,250,5,153,0,0,250,252,1,0,0,0,251,243,1,
        0,0,0,251,252,1,0,0,0,252,253,1,0,0,0,253,254,3,36,18,0,254,17,1,
        0,0,0,255,256,5,96,0,0,256,260,3,36,18,0,257,259,3,16,8,0,258,257,
        1,0,0,0,259,262,1,0,0,0,260,258,1,0,0,0,260,261,1,0,0,0,261,265,
        1,0,0,0,262,260,1,0,0,0,263,264,5,30,0,0,264,266,3,36,18,0,265,263,
        1,0,0,0,265,266,1,0,0,0,266,19,1,0,0,0,267,268,5,42,0,0,268,269,
        5,133,0,0,269,270,3,4,2,0,270,271,5,153,0,0,271,274,3,10,5,0,272,
        273,5,25,0,0,273,275,3,10,5,0,274,272,1,0,0,0,274,275,1,0,0,0,275,
        21,1,0,0,0,276,277,5,103,0,0,277,278,5,133,0,0,278,279,3,4,2,0,279,
        280,5,153,0,0,280,282,3,10,5,0,281,283,5,154,0,0,282,281,1,0,0,0,
        282,283,1,0,0,0,283,23,1,0,0,0,284,285,5,34,0,0,285,289,5,133,0,
        0,286,290,3,6,3,0,287,290,3,30,15,0,288,290,3,4,2,0,289,286,1,0,
        0,0,289,287,1,0,0,0,289,288,1,0,0,0,289,290,1,0,0,0,290,291,1,0,
        0,0,291,293,5,154,0,0,292,294,3,4,2,0,293,292,1,0,0,0,293,294,1,
        0,0,0,294,295,1,0,0,0,295,299,5,154,0,0,296,300,3,6,3,0,297,300,
        3,30,15,0,298,300,3,4,2,0,299,296,1,0,0,0,299,297,1,0,0,0,299,298,
        1,0,0,0,299,300,1,0,0,0,300,301,1,0,0,0,301,302,5,153,0,0,302,304,
        3,10,5,0,303,305,5,154,0,0,304,303,1,0,0,0,304,305,1,0,0,0,305,25,
        1,0,0,0,306,307,5,34,0,0,307,308,5,133,0,0,308,309,5,55,0,0,309,
        312,3,166,83,0,310,311,5,119,0,0,311,313,3,166,83,0,312,310,1,0,
        0,0,312,313,1,0,0,0,313,314,1,0,0,0,314,315,5,44,0,0,315,316,3,4,
        2,0,316,317,5,153,0,0,317,319,3,10,5,0,318,320,5,154,0,0,319,318,
        1,0,0,0,319,320,1,0,0,0,320,27,1,0,0,0,321,322,7,0,0,0,322,323,3,
        166,83,0,323,325,5,133,0,0,324,326,3,8,4,0,325,324,1,0,0,0,325,326,
        1,0,0,0,326,327,1,0,0,0,327,328,5,153,0,0,328,329,3,36,18,0,329,
        29,1,0,0,0,330,331,3,4,2,0,331,332,5,118,0,0,332,333,5,125,0,0,333,
        334,3,4,2,0,334,31,1,0,0,0,335,337,3,4,2,0,336,338,5,154,0,0,337,
        336,1,0,0,0,337,338,1,0,0,0,338,33,1,0,0,0,339,340,5,154,0,0,340,
        35,1,0,0,0,341,345,5,131,0,0,342,344,3,2,1,0,343,342,1,0,0,0,344,
        347,1,0,0,0,345,343,1,0,0,0,345,346,1,0,0,0,346,348,1,0,0,0,347,
        345,1,0,0,0,348,349,5,151,0,0,349,37,1,0,0,0,350,351,3,4,2,0,351,
        352,5,118,0,0,352,353,3,4,2,0,353,39,1,0,0,0,354,359,3,38,19,0,355,
        356,5,119,0,0,356,358,3,38,19,0,357,355,1,0,0,0,358,361,1,0,0,0,
        359,357,1,0,0,0,359,360,1,0,0,0,360,363,1,0,0,0,361,359,1,0,0,0,
        362,364,5,119,0,0,363,362,1,0,0,0,363,364,1,0,0,0,364,41,1,0,0,0,
        365,369,3,48,24,0,366,369,3,50,25,0,367,369,3,130,65,0,368,365,1,
        0,0,0,368,366,1,0,0,0,368,367,1,0,0,0,369,371,1,0,0,0,370,372,5,
        154,0,0,371,370,1,0,0,0,371,372,1,0,0,0,372,373,1,0,0,0,373,374,
        5,0,0,1,374,43,1,0,0,0,375,382,3,50,25,0,376,377,5,133,0,0,377,378,
        3,48,24,0,378,379,5,153,0,0,379,382,1,0,0,0,380,382,3,170,85,0,381,
        375,1,0,0,0,381,376,1,0,0,0,381,380,1,0,0,0,382,45,1,0,0,0,383,392,
        5,27,0,0,384,385,5,98,0,0,385,392,5,1,0,0,386,387,5,98,0,0,387,392,
        5,24,0,0,388,392,5,47,0,0,389,390,5,47,0,0,390,392,5,24,0,0,391,
        383,1,0,0,0,391,384,1,0,0,0,391,386,1,0,0,0,391,388,1,0,0,0,391,
        389,1,0,0,0,392,393,1,0,0,0,393,394,3,44,22,0,394,47,1,0,0,0,395,
        399,3,44,22,0,396,398,3,46,23,0,397,396,1,0,0,0,398,401,1,0,0,0,
        399,397,1,0,0,0,399,400,1,0,0,0,400,49,1,0,0,0,401,399,1,0,0,0,402,
        404,3,52,26,0,403,402,1,0,0,0,403,404,1,0,0,0,404,405,1,0,0,0,405,
        407,5,82,0,0,406,408,5,24,0,0,407,406,1,0,0,0,407,408,1,0,0,0,408,
        410,1,0,0,0,409,411,3,54,27,0,410,409,1,0,0,0,410,411,1,0,0,0,411,
        412,1,0,0,0,412,414,3,120,60,0,413,415,3,56,28,0,414,413,1,0,0,0,
        414,415,1,0,0,0,415,417,1,0,0,0,416,418,3,58,29,0,417,416,1,0,0,
        0,417,418,1,0,0,0,418,420,1,0,0,0,419,421,3,62,31,0,420,419,1,0,
        0,0,420,421,1,0,0,0,421,423,1,0,0,0,422,424,3,64,32,0,423,422,1,
        0,0,0,423,424,1,0,0,0,424,426,1,0,0,0,425,427,3,66,33,0,426,425,
        1,0,0,0,426,427,1,0,0,0,427,430,1,0,0,0,428,429,5,105,0,0,429,431,
        7,1,0,0,430,428,1,0,0,0,430,431,1,0,0,0,431,434,1,0,0,0,432,433,
        5,105,0,0,433,435,5,92,0,0,434,432,1,0,0,0,434,435,1,0,0,0,435,437,
        1,0,0,0,436,438,3,68,34,0,437,436,1,0,0,0,437,438,1,0,0,0,438,440,
        1,0,0,0,439,441,3,60,30,0,440,439,1,0,0,0,440,441,1,0,0,0,441,443,
        1,0,0,0,442,444,3,70,35,0,443,442,1,0,0,0,443,444,1,0,0,0,444,446,
        1,0,0,0,445,447,3,74,37,0,446,445,1,0,0,0,446,447,1,0,0,0,447,450,
        1,0,0,0,448,451,3,76,38,0,449,451,3,78,39,0,450,448,1,0,0,0,450,
        449,1,0,0,0,450,451,1,0,0,0,451,453,1,0,0,0,452,454,3,80,40,0,453,
        452,1,0,0,0,453,454,1,0,0,0,454,51,1,0,0,0,455,456,5,105,0,0,456,
        457,3,134,67,0,457,53,1,0,0,0,458,459,5,91,0,0,459,462,5,111,0,0,
        460,461,5,105,0,0,461,463,5,88,0,0,462,460,1,0,0,0,462,463,1,0,0,
        0,463,55,1,0,0,0,464,465,5,35,0,0,465,466,3,82,41,0,466,57,1,0,0,
        0,467,469,7,2,0,0,468,467,1,0,0,0,468,469,1,0,0,0,469,470,1,0,0,
        0,470,471,5,5,0,0,471,472,5,50,0,0,472,473,3,120,60,0,473,59,1,0,
        0,0,474,475,5,104,0,0,475,476,3,166,83,0,476,477,5,6,0,0,477,478,
        5,133,0,0,478,479,3,104,52,0,479,489,5,153,0,0,480,481,5,119,0,0,
        481,482,3,166,83,0,482,483,5,6,0,0,483,484,5,133,0,0,484,485,3,104,
        52,0,485,486,5,153,0,0,486,488,1,0,0,0,487,480,1,0,0,0,488,491,1,
        0,0,0,489,487,1,0,0,0,489,490,1,0,0,0,490,61,1,0,0,0,491,489,1,0,
        0,0,492,493,5,72,0,0,493,494,3,122,61,0,494,63,1,0,0,0,495,496,5,
        102,0,0,496,497,3,122,61,0,497,65,1,0,0,0,498,499,5,38,0,0,499,506,
        5,11,0,0,500,501,7,1,0,0,501,502,5,133,0,0,502,503,3,120,60,0,503,
        504,5,153,0,0,504,507,1,0,0,0,505,507,3,120,60,0,506,500,1,0,0,0,
        506,505,1,0,0,0,507,67,1,0,0,0,508,509,5,39,0,0,509,510,3,122,61,
        0,510,69,1,0,0,0,511,512,5,67,0,0,512,513,5,11,0,0,513,514,3,94,
        47,0,514,71,1,0,0,0,515,516,5,67,0,0,516,517,5,11,0,0,517,518,3,
        120,60,0,518,73,1,0,0,0,519,520,5,57,0,0,520,521,3,92,46,0,521,522,
        5,11,0,0,522,523,3,120,60,0,523,75,1,0,0,0,524,525,5,57,0,0,525,
        528,3,122,61,0,526,527,5,119,0,0,527,529,3,122,61,0,528,526,1,0,
        0,0,528,529,1,0,0,0,529,532,1,0,0,0,530,531,5,105,0,0,531,533,5,
        88,0,0,532,530,1,0,0,0,532,533,1,0,0,0,533,544,1,0,0,0,534,535,5,
        57,0,0,535,538,3,122,61,0,536,537,5,105,0,0,537,539,5,88,0,0,538,
        536,1,0,0,0,538,539,1,0,0,0,539,540,1,0,0,0,540,541,5,64,0,0,541,
        542,3,122,61,0,542,544,1,0,0,0,543,524,1,0,0,0,543,534,1,0,0,0,544,
        77,1,0,0,0,545,546,5,64,0,0,546,547,3,122,61,0,547,79,1,0,0,0,548,
        549,5,84,0,0,549,550,3,100,50,0,550,81,1,0,0,0,551,552,6,41,-1,0,
        552,554,3,142,71,0,553,555,5,29,0,0,554,553,1,0,0,0,554,555,1,0,
        0,0,555,557,1,0,0,0,556,558,3,90,45,0,557,556,1,0,0,0,557,558,1,
        0,0,0,558,564,1,0,0,0,559,560,5,133,0,0,560,561,3,82,41,0,561,562,
        5,153,0,0,562,564,1,0,0,0,563,551,1,0,0,0,563,559,1,0,0,0,564,579,
        1,0,0,0,565,566,10,3,0,0,566,567,3,86,43,0,567,568,3,82,41,4,568,
        578,1,0,0,0,569,571,10,4,0,0,570,572,3,84,42,0,571,570,1,0,0,0,571,
        572,1,0,0,0,572,573,1,0,0,0,573,574,5,50,0,0,574,575,3,82,41,0,575,
        576,3,88,44,0,576,578,1,0,0,0,577,565,1,0,0,0,577,569,1,0,0,0,578,
        581,1,0,0,0,579,577,1,0,0,0,579,580,1,0,0,0,580,83,1,0,0,0,581,579,
        1,0,0,0,582,584,7,3,0,0,583,582,1,0,0,0,583,584,1,0,0,0,584,585,
        1,0,0,0,585,592,5,46,0,0,586,588,5,46,0,0,587,589,7,3,0,0,588,587,
        1,0,0,0,588,589,1,0,0,0,589,592,1,0,0,0,590,592,7,3,0,0,591,583,
        1,0,0,0,591,586,1,0,0,0,591,590,1,0,0,0,592,626,1,0,0,0,593,595,
        7,4,0,0,594,593,1,0,0,0,594,595,1,0,0,0,595,596,1,0,0,0,596,598,
        7,5,0,0,597,599,5,68,0,0,598,597,1,0,0,0,598,599,1,0,0,0,599,608,
        1,0,0,0,600,602,7,5,0,0,601,603,5,68,0,0,602,601,1,0,0,0,602,603,
        1,0,0,0,603,605,1,0,0,0,604,606,7,4,0,0,605,604,1,0,0,0,605,606,
        1,0,0,0,606,608,1,0,0,0,607,594,1,0,0,0,607,600,1,0,0,0,608,626,
        1,0,0,0,609,611,7,6,0,0,610,609,1,0,0,0,610,611,1,0,0,0,611,612,
        1,0,0,0,612,614,5,36,0,0,613,615,5,68,0,0,614,613,1,0,0,0,614,615,
        1,0,0,0,615,624,1,0,0,0,616,618,5,36,0,0,617,619,5,68,0,0,618,617,
        1,0,0,0,618,619,1,0,0,0,619,621,1,0,0,0,620,622,7,6,0,0,621,620,
        1,0,0,0,621,622,1,0,0,0,622,624,1,0,0,0,623,610,1,0,0,0,623,616,
        1,0,0,0,624,626,1,0,0,0,625,591,1,0,0,0,625,607,1,0,0,0,625,623,
        1,0,0,0,626,85,1,0,0,0,627,628,5,17,0,0,628,631,5,50,0,0,629,631,
        5,119,0,0,630,627,1,0,0,0,630,629,1,0,0,0,631,87,1,0,0,0,632,633,
        5,65,0,0,633,642,3,120,60,0,634,635,5,99,0,0,635,636,5,133,0,0,636,
        637,3,120,60,0,637,638,5,153,0,0,638,642,1,0,0,0,639,640,5,99,0,
        0,640,642,3,120,60,0,641,632,1,0,0,0,641,634,1,0,0,0,641,639,1,0,
        0,0,642,89,1,0,0,0,643,644,5,80,0,0,644,647,3,98,49,0,645,646,5,
        64,0,0,646,648,3,98,49,0,647,645,1,0,0,0,647,648,1,0,0,0,648,91,
        1,0,0,0,649,652,3,122,61,0,650,651,7,7,0,0,651,653,3,122,61,0,652,
        650,1,0,0,0,652,653,1,0,0,0,653,93,1,0,0,0,654,659,3,96,48,0,655,
        656,5,119,0,0,656,658,3,96,48,0,657,655,1,0,0,0,658,661,1,0,0,0,
        659,657,1,0,0,0,659,660,1,0,0,0,660,95,1,0,0,0,661,659,1,0,0,0,662,
        664,3,122,61,0,663,665,7,8,0,0,664,663,1,0,0,0,664,665,1,0,0,0,665,
        668,1,0,0,0,666,667,5,63,0,0,667,669,7,9,0,0,668,666,1,0,0,0,668,
        669,1,0,0,0,669,672,1,0,0,0,670,671,5,16,0,0,671,673,5,113,0,0,672,
        670,1,0,0,0,672,673,1,0,0,0,673,97,1,0,0,0,674,681,3,170,85,0,675,
        678,3,154,77,0,676,677,5,155,0,0,677,679,3,154,77,0,678,676,1,0,
        0,0,678,679,1,0,0,0,679,681,1,0,0,0,680,674,1,0,0,0,680,675,1,0,
        0,0,681,99,1,0,0,0,682,687,3,102,51,0,683,684,5,119,0,0,684,686,
        3,102,51,0,685,683,1,0,0,0,686,689,1,0,0,0,687,685,1,0,0,0,687,688,
        1,0,0,0,688,101,1,0,0,0,689,687,1,0,0,0,690,691,3,166,83,0,691,692,
        5,125,0,0,692,693,3,156,78,0,693,103,1,0,0,0,694,696,3,106,53,0,
        695,694,1,0,0,0,695,696,1,0,0,0,696,698,1,0,0,0,697,699,3,108,54,
        0,698,697,1,0,0,0,698,699,1,0,0,0,699,701,1,0,0,0,700,702,3,110,
        55,0,701,700,1,0,0,0,701,702,1,0,0,0,702,105,1,0,0,0,703,704,5,70,
        0,0,704,705,5,11,0,0,705,706,3,120,60,0,706,107,1,0,0,0,707,708,
        5,67,0,0,708,709,5,11,0,0,709,710,3,94,47,0,710,109,1,0,0,0,711,
        712,7,10,0,0,712,713,3,112,56,0,713,111,1,0,0,0,714,721,3,114,57,
        0,715,716,5,9,0,0,716,717,3,114,57,0,717,718,5,2,0,0,718,719,3,114,
        57,0,719,721,1,0,0,0,720,714,1,0,0,0,720,715,1,0,0,0,721,113,1,0,
        0,0,722,723,5,19,0,0,723,735,5,78,0,0,724,725,5,97,0,0,725,735,5,
        71,0,0,726,727,5,97,0,0,727,735,5,33,0,0,728,729,3,154,77,0,729,
        730,5,71,0,0,730,735,1,0,0,0,731,732,3,154,77,0,732,733,5,33,0,0,
        733,735,1,0,0,0,734,722,1,0,0,0,734,724,1,0,0,0,734,726,1,0,0,0,
        734,728,1,0,0,0,734,731,1,0,0,0,735,115,1,0,0,0,736,737,3,122,61,
        0,737,738,5,0,0,1,738,117,1,0,0,0,739,796,3,166,83,0,740,741,3,166,
        83,0,741,742,5,133,0,0,742,743,3,166,83,0,743,750,3,118,59,0,744,
        745,5,119,0,0,745,746,3,166,83,0,746,747,3,118,59,0,747,749,1,0,
        0,0,748,744,1,0,0,0,749,752,1,0,0,0,750,748,1,0,0,0,750,751,1,0,
        0,0,751,754,1,0,0,0,752,750,1,0,0,0,753,755,5,119,0,0,754,753,1,
        0,0,0,754,755,1,0,0,0,755,756,1,0,0,0,756,757,5,153,0,0,757,796,
        1,0,0,0,758,759,3,166,83,0,759,760,5,133,0,0,760,765,3,168,84,0,
        761,762,5,119,0,0,762,764,3,168,84,0,763,761,1,0,0,0,764,767,1,0,
        0,0,765,763,1,0,0,0,765,766,1,0,0,0,766,769,1,0,0,0,767,765,1,0,
        0,0,768,770,5,119,0,0,769,768,1,0,0,0,769,770,1,0,0,0,770,771,1,
        0,0,0,771,772,5,153,0,0,772,796,1,0,0,0,773,774,3,166,83,0,774,775,
        5,133,0,0,775,780,3,118,59,0,776,777,5,119,0,0,777,779,3,118,59,
        0,778,776,1,0,0,0,779,782,1,0,0,0,780,778,1,0,0,0,780,781,1,0,0,
        0,781,784,1,0,0,0,782,780,1,0,0,0,783,785,5,119,0,0,784,783,1,0,
        0,0,784,785,1,0,0,0,785,786,1,0,0,0,786,787,5,153,0,0,787,796,1,
        0,0,0,788,789,3,166,83,0,789,791,5,133,0,0,790,792,3,120,60,0,791,
        790,1,0,0,0,791,792,1,0,0,0,792,793,1,0,0,0,793,794,5,153,0,0,794,
        796,1,0,0,0,795,739,1,0,0,0,795,740,1,0,0,0,795,758,1,0,0,0,795,
        773,1,0,0,0,795,788,1,0,0,0,796,119,1,0,0,0,797,802,3,122,61,0,798,
        799,5,119,0,0,799,801,3,122,61,0,800,798,1,0,0,0,801,804,1,0,0,0,
        802,800,1,0,0,0,802,803,1,0,0,0,803,806,1,0,0,0,804,802,1,0,0,0,
        805,807,5,119,0,0,806,805,1,0,0,0,806,807,1,0,0,0,807,121,1,0,0,
        0,808,809,6,61,-1,0,809,811,5,12,0,0,810,812,3,122,61,0,811,810,
        1,0,0,0,811,812,1,0,0,0,812,818,1,0,0,0,813,814,5,101,0,0,814,815,
        3,122,61,0,815,816,5,86,0,0,816,817,3,122,61,0,817,819,1,0,0,0,818,
        813,1,0,0,0,819,820,1,0,0,0,820,818,1,0,0,0,820,821,1,0,0,0,821,
        824,1,0,0,0,822,823,5,25,0,0,823,825,3,122,61,0,824,822,1,0,0,0,
        824,825,1,0,0,0,825,826,1,0,0,0,826,827,5,26,0,0,827,961,1,0,0,0,
        828,829,5,13,0,0,829,830,5,133,0,0,830,831,3,122,61,0,831,832,5,
        6,0,0,832,833,3,118,59,0,833,834,5,153,0,0,834,961,1,0,0,0,835,836,
        5,20,0,0,836,961,5,113,0,0,837,838,5,48,0,0,838,961,5,113,0,0,839,
        840,5,48,0,0,840,841,3,122,61,0,841,842,3,158,79,0,842,961,1,0,0,
        0,843,844,5,85,0,0,844,845,5,133,0,0,845,846,3,122,61,0,846,847,
        5,35,0,0,847,850,3,122,61,0,848,849,5,34,0,0,849,851,3,122,61,0,
        850,848,1,0,0,0,850,851,1,0,0,0,851,852,1,0,0,0,852,853,5,153,0,
        0,853,961,1,0,0,0,854,855,5,89,0,0,855,961,5,113,0,0,856,857,5,94,
        0,0,857,858,5,133,0,0,858,859,7,11,0,0,859,860,3,172,86,0,860,861,
        5,35,0,0,861,862,3,122,61,0,862,863,5,153,0,0,863,961,1,0,0,0,864,
        865,3,166,83,0,865,867,5,133,0,0,866,868,3,120,60,0,867,866,1,0,
        0,0,867,868,1,0,0,0,868,869,1,0,0,0,869,870,5,153,0,0,870,879,1,
        0,0,0,871,873,5,133,0,0,872,874,5,24,0,0,873,872,1,0,0,0,873,874,
        1,0,0,0,874,876,1,0,0,0,875,877,3,120,60,0,876,875,1,0,0,0,876,877,
        1,0,0,0,877,878,1,0,0,0,878,880,5,153,0,0,879,871,1,0,0,0,879,880,
        1,0,0,0,880,881,1,0,0,0,881,882,5,69,0,0,882,883,5,133,0,0,883,884,
        3,104,52,0,884,885,5,153,0,0,885,961,1,0,0,0,886,887,3,166,83,0,
        887,889,5,133,0,0,888,890,3,120,60,0,889,888,1,0,0,0,889,890,1,0,
        0,0,890,891,1,0,0,0,891,892,5,153,0,0,892,901,1,0,0,0,893,895,5,
        133,0,0,894,896,5,24,0,0,895,894,1,0,0,0,895,896,1,0,0,0,896,898,
        1,0,0,0,897,899,3,120,60,0,898,897,1,0,0,0,898,899,1,0,0,0,899,900,
        1,0,0,0,900,902,5,153,0,0,901,893,1,0,0,0,901,902,1,0,0,0,902,903,
        1,0,0,0,903,904,5,69,0,0,904,905,3,166,83,0,905,961,1,0,0,0,906,
        912,3,166,83,0,907,909,5,133,0,0,908,910,3,120,60,0,909,908,1,0,
        0,0,909,910,1,0,0,0,910,911,1,0,0,0,911,913,5,153,0,0,912,907,1,
        0,0,0,912,913,1,0,0,0,913,914,1,0,0,0,914,916,5,133,0,0,915,917,
        5,24,0,0,916,915,1,0,0,0,916,917,1,0,0,0,917,919,1,0,0,0,918,920,
        3,120,60,0,919,918,1,0,0,0,919,920,1,0,0,0,920,921,1,0,0,0,921,922,
        5,153,0,0,922,961,1,0,0,0,923,961,3,130,65,0,924,961,3,174,87,0,
        925,961,3,156,78,0,926,927,5,121,0,0,927,961,3,122,61,20,928,929,
        5,61,0,0,929,961,3,122,61,14,930,931,3,146,73,0,931,932,5,123,0,
        0,932,934,1,0,0,0,933,930,1,0,0,0,933,934,1,0,0,0,934,935,1,0,0,
        0,935,961,5,115,0,0,936,937,5,133,0,0,937,938,3,48,24,0,938,939,
        5,153,0,0,939,961,1,0,0,0,940,941,5,133,0,0,941,942,3,122,61,0,942,
        943,5,153,0,0,943,961,1,0,0,0,944,945,5,133,0,0,945,946,3,120,60,
        0,946,947,5,153,0,0,947,961,1,0,0,0,948,950,5,132,0,0,949,951,3,
        120,60,0,950,949,1,0,0,0,950,951,1,0,0,0,951,952,1,0,0,0,952,961,
        5,152,0,0,953,955,5,131,0,0,954,956,3,40,20,0,955,954,1,0,0,0,955,
        956,1,0,0,0,956,957,1,0,0,0,957,961,5,151,0,0,958,961,3,124,62,0,
        959,961,3,138,69,0,960,808,1,0,0,0,960,828,1,0,0,0,960,835,1,0,0,
        0,960,837,1,0,0,0,960,839,1,0,0,0,960,843,1,0,0,0,960,854,1,0,0,
        0,960,856,1,0,0,0,960,864,1,0,0,0,960,886,1,0,0,0,960,906,1,0,0,
        0,960,923,1,0,0,0,960,924,1,0,0,0,960,925,1,0,0,0,960,926,1,0,0,
        0,960,928,1,0,0,0,960,933,1,0,0,0,960,936,1,0,0,0,960,940,1,0,0,
        0,960,944,1,0,0,0,960,948,1,0,0,0,960,953,1,0,0,0,960,958,1,0,0,
        0,960,959,1,0,0,0,961,1077,1,0,0,0,962,966,10,19,0,0,963,967,5,115,
        0,0,964,967,5,155,0,0,965,967,5,142,0,0,966,963,1,0,0,0,966,964,
        1,0,0,0,966,965,1,0,0,0,967,968,1,0,0,0,968,1076,3,122,61,20,969,
        973,10,18,0,0,970,974,5,143,0,0,971,974,5,121,0,0,972,974,5,120,
        0,0,973,970,1,0,0,0,973,971,1,0,0,0,973,972,1,0,0,0,974,975,1,0,
        0,0,975,1076,3,122,61,19,976,1001,10,17,0,0,977,1002,5,124,0,0,978,
        1002,5,125,0,0,979,1002,5,137,0,0,980,1002,5,134,0,0,981,1002,5,
        135,0,0,982,1002,5,126,0,0,983,1002,5,127,0,0,984,986,5,61,0,0,985,
        984,1,0,0,0,985,986,1,0,0,0,986,987,1,0,0,0,987,989,5,44,0,0,988,
        990,5,15,0,0,989,988,1,0,0,0,989,990,1,0,0,0,990,1002,1,0,0,0,991,
        993,5,61,0,0,992,991,1,0,0,0,992,993,1,0,0,0,993,994,1,0,0,0,994,
        1002,7,12,0,0,995,1002,5,149,0,0,996,1002,5,150,0,0,997,1002,5,139,
        0,0,998,1002,5,129,0,0,999,1002,5,130,0,0,1000,1002,5,138,0,0,1001,
        977,1,0,0,0,1001,978,1,0,0,0,1001,979,1,0,0,0,1001,980,1,0,0,0,1001,
        981,1,0,0,0,1001,982,1,0,0,0,1001,983,1,0,0,0,1001,985,1,0,0,0,1001,
        992,1,0,0,0,1001,995,1,0,0,0,1001,996,1,0,0,0,1001,997,1,0,0,0,1001,
        998,1,0,0,0,1001,999,1,0,0,0,1001,1000,1,0,0,0,1002,1003,1,0,0,0,
        1003,1076,3,122,61,18,1004,1005,10,15,0,0,1005,1006,5,141,0,0,1006,
        1076,3,122,61,16,1007,1008,10,13,0,0,1008,1009,5,2,0,0,1009,1076,
        3,122,61,14,1010,1011,10,12,0,0,1011,1012,5,66,0,0,1012,1076,3,122,
        61,13,1013,1015,10,11,0,0,1014,1016,5,61,0,0,1015,1014,1,0,0,0,1015,
        1016,1,0,0,0,1016,1017,1,0,0,0,1017,1018,5,9,0,0,1018,1019,3,122,
        61,0,1019,1020,5,2,0,0,1020,1021,3,122,61,12,1021,1076,1,0,0,0,1022,
        1023,10,10,0,0,1023,1024,5,144,0,0,1024,1025,3,122,61,0,1025,1026,
        5,118,0,0,1026,1027,3,122,61,10,1027,1076,1,0,0,0,1028,1029,10,31,
        0,0,1029,1030,5,133,0,0,1030,1031,3,48,24,0,1031,1032,5,153,0,0,
        1032,1076,1,0,0,0,1033,1034,10,30,0,0,1034,1036,5,133,0,0,1035,1037,
        3,120,60,0,1036,1035,1,0,0,0,1036,1037,1,0,0,0,1037,1038,1,0,0,0,
        1038,1076,5,153,0,0,1039,1040,10,26,0,0,1040,1041,5,132,0,0,1041,
        1042,3,122,61,0,1042,1043,5,152,0,0,1043,1076,1,0,0,0,1044,1045,
        10,25,0,0,1045,1046,5,123,0,0,1046,1076,5,111,0,0,1047,1048,10,24,
        0,0,1048,1049,5,123,0,0,1049,1076,3,166,83,0,1050,1051,10,23,0,0,
        1051,1052,5,140,0,0,1052,1053,5,132,0,0,1053,1054,3,122,61,0,1054,
        1055,5,152,0,0,1055,1076,1,0,0,0,1056,1057,10,22,0,0,1057,1058,5,
        140,0,0,1058,1076,5,111,0,0,1059,1060,10,21,0,0,1060,1061,5,140,
        0,0,1061,1076,3,166,83,0,1062,1063,10,16,0,0,1063,1065,5,49,0,0,
        1064,1066,5,61,0,0,1065,1064,1,0,0,0,1065,1066,1,0,0,0,1066,1067,
        1,0,0,0,1067,1076,5,62,0,0,1068,1073,10,9,0,0,1069,1070,5,6,0,0,
        1070,1074,3,166,83,0,1071,1072,5,6,0,0,1072,1074,5,113,0,0,1073,
        1069,1,0,0,0,1073,1071,1,0,0,0,1074,1076,1,0,0,0,1075,962,1,0,0,
        0,1075,969,1,0,0,0,1075,976,1,0,0,0,1075,1004,1,0,0,0,1075,1007,
        1,0,0,0,1075,1010,1,0,0,0,1075,1013,1,0,0,0,1075,1022,1,0,0,0,1075,
        1028,1,0,0,0,1075,1033,1,0,0,0,1075,1039,1,0,0,0,1075,1044,1,0,0,
        0,1075,1047,1,0,0,0,1075,1050,1,0,0,0,1075,1056,1,0,0,0,1075,1059,
        1,0,0,0,1075,1062,1,0,0,0,1075,1068,1,0,0,0,1076,1079,1,0,0,0,1077,
        1075,1,0,0,0,1077,1078,1,0,0,0,1078,123,1,0,0,0,1079,1077,1,0,0,
        0,1080,1081,5,133,0,0,1081,1086,3,166,83,0,1082,1083,5,119,0,0,1083,
        1085,3,166,83,0,1084,1082,1,0,0,0,1085,1088,1,0,0,0,1086,1084,1,
        0,0,0,1086,1087,1,0,0,0,1087,1090,1,0,0,0,1088,1086,1,0,0,0,1089,
        1091,5,119,0,0,1090,1089,1,0,0,0,1090,1091,1,0,0,0,1091,1092,1,0,
        0,0,1092,1093,5,153,0,0,1093,1108,1,0,0,0,1094,1099,3,166,83,0,1095,
        1096,5,119,0,0,1096,1098,3,166,83,0,1097,1095,1,0,0,0,1098,1101,
        1,0,0,0,1099,1097,1,0,0,0,1099,1100,1,0,0,0,1100,1103,1,0,0,0,1101,
        1099,1,0,0,0,1102,1104,5,119,0,0,1103,1102,1,0,0,0,1103,1104,1,0,
        0,0,1104,1108,1,0,0,0,1105,1106,5,133,0,0,1106,1108,5,153,0,0,1107,
        1080,1,0,0,0,1107,1094,1,0,0,0,1107,1105,1,0,0,0,1108,1109,1,0,0,
        0,1109,1112,5,114,0,0,1110,1113,3,122,61,0,1111,1113,3,36,18,0,1112,
        1110,1,0,0,0,1112,1111,1,0,0,0,1113,125,1,0,0,0,1114,1121,3,130,
        65,0,1115,1121,3,128,64,0,1116,1117,5,131,0,0,1117,1118,3,122,61,
        0,1118,1119,5,151,0,0,1119,1121,1,0,0,0,1120,1114,1,0,0,0,1120,1115,
        1,0,0,0,1120,1116,1,0,0,0,1121,127,1,0,0,0,1122,1123,5,167,0,0,1123,
        129,1,0,0,0,1124,1125,5,135,0,0,1125,1129,3,166,83,0,1126,1128,3,
        132,66,0,1127,1126,1,0,0,0,1128,1131,1,0,0,0,1129,1127,1,0,0,0,1129,
        1130,1,0,0,0,1130,1132,1,0,0,0,1131,1129,1,0,0,0,1132,1133,5,156,
        0,0,1133,1154,1,0,0,0,1134,1135,5,135,0,0,1135,1139,3,166,83,0,1136,
        1138,3,132,66,0,1137,1136,1,0,0,0,1138,1141,1,0,0,0,1139,1137,1,
        0,0,0,1139,1140,1,0,0,0,1140,1142,1,0,0,0,1141,1139,1,0,0,0,1142,
        1146,5,127,0,0,1143,1145,3,126,63,0,1144,1143,1,0,0,0,1145,1148,
        1,0,0,0,1146,1144,1,0,0,0,1146,1147,1,0,0,0,1147,1149,1,0,0,0,1148,
        1146,1,0,0,0,1149,1150,5,136,0,0,1150,1151,3,166,83,0,1151,1152,
        5,127,0,0,1152,1154,1,0,0,0,1153,1124,1,0,0,0,1153,1134,1,0,0,0,
        1154,131,1,0,0,0,1155,1156,3,166,83,0,1156,1157,5,125,0,0,1157,1158,
        3,172,86,0,1158,1167,1,0,0,0,1159,1160,3,166,83,0,1160,1161,5,125,
        0,0,1161,1162,5,131,0,0,1162,1163,3,122,61,0,1163,1164,5,151,0,0,
        1164,1167,1,0,0,0,1165,1167,3,166,83,0,1166,1155,1,0,0,0,1166,1159,
        1,0,0,0,1166,1165,1,0,0,0,1167,133,1,0,0,0,1168,1173,3,136,68,0,
        1169,1170,5,119,0,0,1170,1172,3,136,68,0,1171,1169,1,0,0,0,1172,
        1175,1,0,0,0,1173,1171,1,0,0,0,1173,1174,1,0,0,0,1174,1177,1,0,0,
        0,1175,1173,1,0,0,0,1176,1178,5,119,0,0,1177,1176,1,0,0,0,1177,1178,
        1,0,0,0,1178,135,1,0,0,0,1179,1180,3,166,83,0,1180,1181,5,6,0,0,
        1181,1182,5,133,0,0,1182,1183,3,48,24,0,1183,1184,5,153,0,0,1184,
        1190,1,0,0,0,1185,1186,3,122,61,0,1186,1187,5,6,0,0,1187,1188,3,
        166,83,0,1188,1190,1,0,0,0,1189,1179,1,0,0,0,1189,1185,1,0,0,0,1190,
        137,1,0,0,0,1191,1199,3,170,85,0,1192,1193,3,146,73,0,1193,1194,
        5,123,0,0,1194,1196,1,0,0,0,1195,1192,1,0,0,0,1195,1196,1,0,0,0,
        1196,1197,1,0,0,0,1197,1199,3,140,70,0,1198,1191,1,0,0,0,1198,1195,
        1,0,0,0,1199,139,1,0,0,0,1200,1205,3,166,83,0,1201,1202,5,123,0,
        0,1202,1204,3,166,83,0,1203,1201,1,0,0,0,1204,1207,1,0,0,0,1205,
        1203,1,0,0,0,1205,1206,1,0,0,0,1206,141,1,0,0,0,1207,1205,1,0,0,
        0,1208,1209,6,71,-1,0,1209,1218,3,146,73,0,1210,1218,3,144,72,0,
        1211,1212,5,133,0,0,1212,1213,3,48,24,0,1213,1214,5,153,0,0,1214,
        1218,1,0,0,0,1215,1218,3,130,65,0,1216,1218,3,170,85,0,1217,1208,
        1,0,0,0,1217,1210,1,0,0,0,1217,1211,1,0,0,0,1217,1215,1,0,0,0,1217,
        1216,1,0,0,0,1218,1227,1,0,0,0,1219,1223,10,3,0,0,1220,1224,3,164,
        82,0,1221,1222,5,6,0,0,1222,1224,3,166,83,0,1223,1220,1,0,0,0,1223,
        1221,1,0,0,0,1224,1226,1,0,0,0,1225,1219,1,0,0,0,1226,1229,1,0,0,
        0,1227,1225,1,0,0,0,1227,1228,1,0,0,0,1228,143,1,0,0,0,1229,1227,
        1,0,0,0,1230,1231,3,166,83,0,1231,1233,5,133,0,0,1232,1234,3,148,
        74,0,1233,1232,1,0,0,0,1233,1234,1,0,0,0,1234,1235,1,0,0,0,1235,
        1236,5,153,0,0,1236,145,1,0,0,0,1237,1238,3,150,75,0,1238,1239,5,
        123,0,0,1239,1241,1,0,0,0,1240,1237,1,0,0,0,1240,1241,1,0,0,0,1241,
        1242,1,0,0,0,1242,1243,3,140,70,0,1243,147,1,0,0,0,1244,1249,3,122,
        61,0,1245,1246,5,119,0,0,1246,1248,3,122,61,0,1247,1245,1,0,0,0,
        1248,1251,1,0,0,0,1249,1247,1,0,0,0,1249,1250,1,0,0,0,1250,1253,
        1,0,0,0,1251,1249,1,0,0,0,1252,1254,5,119,0,0,1253,1252,1,0,0,0,
        1253,1254,1,0,0,0,1254,149,1,0,0,0,1255,1256,3,166,83,0,1256,151,
        1,0,0,0,1257,1266,5,109,0,0,1258,1259,5,123,0,0,1259,1266,7,13,0,
        0,1260,1261,5,111,0,0,1261,1263,5,123,0,0,1262,1264,7,13,0,0,1263,
        1262,1,0,0,0,1263,1264,1,0,0,0,1264,1266,1,0,0,0,1265,1257,1,0,0,
        0,1265,1258,1,0,0,0,1265,1260,1,0,0,0,1266,153,1,0,0,0,1267,1269,
        7,14,0,0,1268,1267,1,0,0,0,1268,1269,1,0,0,0,1269,1276,1,0,0,0,1270,
        1277,3,152,76,0,1271,1277,5,110,0,0,1272,1277,5,111,0,0,1273,1277,
        5,112,0,0,1274,1277,5,45,0,0,1275,1277,5,60,0,0,1276,1270,1,0,0,
        0,1276,1271,1,0,0,0,1276,1272,1,0,0,0,1276,1273,1,0,0,0,1276,1274,
        1,0,0,0,1276,1275,1,0,0,0,1277,155,1,0,0,0,1278,1282,3,154,77,0,
        1279,1282,5,113,0,0,1280,1282,5,62,0,0,1281,1278,1,0,0,0,1281,1279,
        1,0,0,0,1281,1280,1,0,0,0,1282,157,1,0,0,0,1283,1284,7,15,0,0,1284,
        159,1,0,0,0,1285,1286,7,16,0,0,1286,161,1,0,0,0,1287,1288,7,17,0,
        0,1288,163,1,0,0,0,1289,1292,5,108,0,0,1290,1292,3,162,81,0,1291,
        1289,1,0,0,0,1291,1290,1,0,0,0,1292,165,1,0,0,0,1293,1297,5,108,
        0,0,1294,1297,3,158,79,0,1295,1297,3,160,80,0,1296,1293,1,0,0,0,
        1296,1294,1,0,0,0,1296,1295,1,0,0,0,1297,167,1,0,0,0,1298,1299,3,
        172,86,0,1299,1300,5,125,0,0,1300,1301,3,154,77,0,1301,169,1,0,0,
        0,1302,1303,5,131,0,0,1303,1304,3,122,61,0,1304,1305,5,151,0,0,1305,
        171,1,0,0,0,1306,1309,5,113,0,0,1307,1309,3,174,87,0,1308,1306,1,
        0,0,0,1308,1307,1,0,0,0,1309,173,1,0,0,0,1310,1314,5,146,0,0,1311,
        1313,3,176,88,0,1312,1311,1,0,0,0,1313,1316,1,0,0,0,1314,1312,1,
        0,0,0,1314,1315,1,0,0,0,1315,1317,1,0,0,0,1316,1314,1,0,0,0,1317,
        1318,5,148,0,0,1318,175,1,0,0,0,1319,1320,5,162,0,0,1320,1321,3,
        122,61,0,1321,1322,5,151,0,0,1322,1325,1,0,0,0,1323,1325,5,161,0,
        0,1324,1319,1,0,0,0,1324,1323,1,0,0,0,1325,177,1,0,0,0,1326,1330,
        5,147,0,0,1327,1329,3,180,90,0,1328,1327,1,0,0,0,1329,1332,1,0,0,
        0,1330,1328,1,0,0,0,1330,1331,1,0,0,0,1331,1333,1,0,0,0,1332,1330,
        1,0,0,0,1333,1334,5,0,0,1,1334,179,1,0,0,0,1335,1336,5,164,0,0,1336,
        1337,3,122,61,0,1337,1338,5,151,0,0,1338,1341,1,0,0,0,1339,1341,
        5,163,0,0,1340,1335,1,0,0,0,1340,1339,1,0,0,0,1341,181,1,0,0,0,171,
        185,192,201,208,212,226,230,233,237,240,247,251,260,265,274,282,
        289,293,299,304,312,319,325,337,345,359,363,368,371,381,391,399,
        403,407,410,414,417,420,423,426,430,434,437,440,443,446,450,453,
        462,468,489,506,528,532,538,543,554,557,563,571,577,579,583,588,
        591,594,598,602,605,607,610,614,618,621,623,625,630,641,647,652,
        659,664,668,672,678,680,687,695,698,701,720,734,750,754,765,769,
        780,784,791,795,802,806,811,820,824,850,867,873,876,879,889,895,
        898,901,909,912,916,919,933,950,955,960,966,973,985,989,992,1001,
        1015,1036,1065,1073,1075,1077,1086,1090,1099,1103,1107,1112,1120,
        1129,1139,1146,1153,1166,1173,1177,1189,1195,1198,1205,1217,1223,
        1227,1233,1240,1249,1253,1263,1265,1268,1276,1281,1291,1296,1308,
        1314,1324,1330,1340
    ]

class HogQLParser ( Parser ):

    grammarFileName = "HogQLParser.g4"

    atn = ATNDeserializer().deserialize(serializedATN())

    decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", 
                     "<INVALID>", "<INVALID>", "'->'", "'*'", "'`'", "'\\'", 
                     "':'", "','", "'||'", "'-'", "'$'", "'.'", "'=='", 
                     "<INVALID>", "'>='", "<INVALID>", "'#'", "'~*'", "'=~*'", 
                     "'{'", "'['", "'('", "'<='", "'<'", "'</'", "<INVALID>", 
                     "'!~*'", "'!~'", "'?.'", "'??'", "'%'", "'+'", "'?'", 
                     "'\"'", "'f''", "'F''", "'''", "'~'", "'=~'", "'}'", 
                     "']'", "')'", "';'", "'/'", "<INVALID>", "'_'" ]

    symbolicNames = [ "<INVALID>", "ALL", "AND", "ANTI", "ANY", "ARRAY", 
                      "AS", "ASCENDING", "ASOF", "BETWEEN", "BOTH", "BY", 
                      "CASE", "CAST", "CATCH", "COHORT", "COLLATE", "CROSS", 
                      "CUBE", "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", 
                      "DISTINCT", "ELSE", "END", "EXCEPT", "EXTRACT", "FINAL", 
                      "FINALLY", "FIRST", "FN", "FOLLOWING", "FOR", "FROM", 
                      "FULL", "FUN", "GROUP", "HAVING", "HOUR", "ID", "IF", 
                      "ILIKE", "IN", "INF", "INNER", "INTERSECT", "INTERVAL", 
                      "IS", "JOIN", "KEY", "LAST", "LEADING", "LEFT", "LET", 
                      "LIKE", "LIMIT", "MINUTE", "MONTH", "NAN_SQL", "NOT", 
                      "NULL_SQL", "NULLS", "OFFSET", "ON", "OR", "ORDER", 
                      "OUTER", "OVER", "PARTITION", "PRECEDING", "PREWHERE", 
                      "QUARTER", "RANGE", "RETURN", "RIGHT", "ROLLUP", "ROW", 
                      "ROWS", "SAMPLE", "SECOND", "SELECT", "SEMI", "SETTINGS", 
                      "SUBSTRING", "THEN", "THROW", "TIES", "TIMESTAMP", 
                      "TO", "TOP", "TOTALS", "TRAILING", "TRIM", "TRUNCATE", 
                      "TRY", "UNBOUNDED", "UNION", "USING", "WEEK", "WHEN", 
                      "WHERE", "WHILE", "WINDOW", "WITH", "YEAR", "ESCAPE_CHAR_COMMON", 
                      "IDENTIFIER", "FLOATING_LITERAL", "OCTAL_LITERAL", 
                      "DECIMAL_LITERAL", "HEXADECIMAL_LITERAL", "STRING_LITERAL", 
                      "ARROW", "ASTERISK", "BACKQUOTE", "BACKSLASH", "COLON", 
                      "COMMA", "CONCAT", "DASH", "DOLLAR", "DOT", "EQ_DOUBLE", 
                      "EQ_SINGLE", "GT_EQ", "GT", "HASH", "IREGEX_SINGLE", 
                      "IREGEX_DOUBLE", "LBRACE", "LBRACKET", "LPAREN", "LT_EQ", 
                      "LT", "LT_SLASH", "NOT_EQ", "NOT_IREGEX", "NOT_REGEX", 
                      "NULL_PROPERTY", "NULLISH", "PERCENT", "PLUS", "QUERY", 
                      "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", "QUOTE_SINGLE_TEMPLATE_FULL", 
                      "QUOTE_SINGLE", "REGEX_SINGLE", "REGEX_DOUBLE", "RBRACE", 
                      "RBRACKET", "RPAREN", "SEMICOLON", "SLASH", "SLASH_GT", 
                      "UNDERSCORE", "MULTI_LINE_COMMENT", "SINGLE_LINE_COMMENT", 
                      "WHITESPACE", "STRING_TEXT", "STRING_ESCAPE_TRIGGER", 
                      "FULL_STRING_TEXT", "FULL_STRING_ESCAPE_TRIGGER", 
                      "TAG_WS", "TAGC_WS", "HOGQLX_TEXT_TEXT", "HOGQLX_TEXT_WS" ]

    RULE_program = 0
    RULE_declaration = 1
    RULE_expression = 2
    RULE_varDecl = 3
    RULE_identifierList = 4
    RULE_statement = 5
    RULE_returnStmt = 6
    RULE_throwStmt = 7
    RULE_catchBlock = 8
    RULE_tryCatchStmt = 9
    RULE_ifStmt = 10
    RULE_whileStmt = 11
    RULE_forStmt = 12
    RULE_forInStmt = 13
    RULE_funcStmt = 14
    RULE_varAssignment = 15
    RULE_exprStmt = 16
    RULE_emptyStmt = 17
    RULE_block = 18
    RULE_kvPair = 19
    RULE_kvPairList = 20
    RULE_select = 21
    RULE_selectStmtWithParens = 22
    RULE_subsequentSelectSetClause = 23
    RULE_selectSetStmt = 24
    RULE_selectStmt = 25
    RULE_withClause = 26
    RULE_topClause = 27
    RULE_fromClause = 28
    RULE_arrayJoinClause = 29
    RULE_windowClause = 30
    RULE_prewhereClause = 31
    RULE_whereClause = 32
    RULE_groupByClause = 33
    RULE_havingClause = 34
    RULE_orderByClause = 35
    RULE_projectionOrderByClause = 36
    RULE_limitByClause = 37
    RULE_limitAndOffsetClause = 38
    RULE_offsetOnlyClause = 39
    RULE_settingsClause = 40
    RULE_joinExpr = 41
    RULE_joinOp = 42
    RULE_joinOpCross = 43
    RULE_joinConstraintClause = 44
    RULE_sampleClause = 45
    RULE_limitExpr = 46
    RULE_orderExprList = 47
    RULE_orderExpr = 48
    RULE_ratioExpr = 49
    RULE_settingExprList = 50
    RULE_settingExpr = 51
    RULE_windowExpr = 52
    RULE_winPartitionByClause = 53
    RULE_winOrderByClause = 54
    RULE_winFrameClause = 55
    RULE_winFrameExtend = 56
    RULE_winFrameBound = 57
    RULE_expr = 58
    RULE_columnTypeExpr = 59
    RULE_columnExprList = 60
    RULE_columnExpr = 61
    RULE_columnLambdaExpr = 62
    RULE_hogqlxChildElement = 63
    RULE_hogqlxText = 64
    RULE_hogqlxTagElement = 65
    RULE_hogqlxTagAttribute = 66
    RULE_withExprList = 67
    RULE_withExpr = 68
    RULE_columnIdentifier = 69
    RULE_nestedIdentifier = 70
    RULE_tableExpr = 71
    RULE_tableFunctionExpr = 72
    RULE_tableIdentifier = 73
    RULE_tableArgList = 74
    RULE_databaseIdentifier = 75
    RULE_floatingLiteral = 76
    RULE_numberLiteral = 77
    RULE_literal = 78
    RULE_interval = 79
    RULE_keyword = 80
    RULE_keywordForAlias = 81
    RULE_alias = 82
    RULE_identifier = 83
    RULE_enumValue = 84
    RULE_placeholder = 85
    RULE_string = 86
    RULE_templateString = 87
    RULE_stringContents = 88
    RULE_fullTemplateString = 89
    RULE_stringContentsFull = 90

    ruleNames =  [ "program", "declaration", "expression", "varDecl", "identifierList", 
                   "statement", "returnStmt", "throwStmt", "catchBlock", 
                   "tryCatchStmt", "ifStmt", "whileStmt", "forStmt", "forInStmt", 
                   "funcStmt", "varAssignment", "exprStmt", "emptyStmt", 
                   "block", "kvPair", "kvPairList", "select", "selectStmtWithParens", 
                   "subsequentSelectSetClause", "selectSetStmt", "selectStmt", 
                   "withClause", "topClause", "fromClause", "arrayJoinClause", 
                   "windowClause", "prewhereClause", "whereClause", "groupByClause", 
                   "havingClause", "orderByClause", "projectionOrderByClause", 
                   "limitByClause", "limitAndOffsetClause", "offsetOnlyClause", 
                   "settingsClause", "joinExpr", "joinOp", "joinOpCross", 
                   "joinConstraintClause", "sampleClause", "limitExpr", 
                   "orderExprList", "orderExpr", "ratioExpr", "settingExprList", 
                   "settingExpr", "windowExpr", "winPartitionByClause", 
                   "winOrderByClause", "winFrameClause", "winFrameExtend", 
                   "winFrameBound", "expr", "columnTypeExpr", "columnExprList", 
                   "columnExpr", "columnLambdaExpr", "hogqlxChildElement", 
                   "hogqlxText", "hogqlxTagElement", "hogqlxTagAttribute", 
                   "withExprList", "withExpr", "columnIdentifier", "nestedIdentifier", 
                   "tableExpr", "tableFunctionExpr", "tableIdentifier", 
                   "tableArgList", "databaseIdentifier", "floatingLiteral", 
                   "numberLiteral", "literal", "interval", "keyword", "keywordForAlias", 
                   "alias", "identifier", "enumValue", "placeholder", "string", 
                   "templateString", "stringContents", "fullTemplateString", 
                   "stringContentsFull" ]

    EOF = Token.EOF
    ALL=1
    AND=2
    ANTI=3
    ANY=4
    ARRAY=5
    AS=6
    ASCENDING=7
    ASOF=8
    BETWEEN=9
    BOTH=10
    BY=11
    CASE=12
    CAST=13
    CATCH=14
    COHORT=15
    COLLATE=16
    CROSS=17
    CUBE=18
    CURRENT=19
    DATE=20
    DAY=21
    DESC=22
    DESCENDING=23
    DISTINCT=24
    ELSE=25
    END=26
    EXCEPT=27
    EXTRACT=28
    FINAL=29
    FINALLY=30
    FIRST=31
    FN=32
    FOLLOWING=33
    FOR=34
    FROM=35
    FULL=36
    FUN=37
    GROUP=38
    HAVING=39
    HOUR=40
    ID=41
    IF=42
    ILIKE=43
    IN=44
    INF=45
    INNER=46
    INTERSECT=47
    INTERVAL=48
    IS=49
    JOIN=50
    KEY=51
    LAST=52
    LEADING=53
    LEFT=54
    LET=55
    LIKE=56
    LIMIT=57
    MINUTE=58
    MONTH=59
    NAN_SQL=60
    NOT=61
    NULL_SQL=62
    NULLS=63
    OFFSET=64
    ON=65
    OR=66
    ORDER=67
    OUTER=68
    OVER=69
    PARTITION=70
    PRECEDING=71
    PREWHERE=72
    QUARTER=73
    RANGE=74
    RETURN=75
    RIGHT=76
    ROLLUP=77
    ROW=78
    ROWS=79
    SAMPLE=80
    SECOND=81
    SELECT=82
    SEMI=83
    SETTINGS=84
    SUBSTRING=85
    THEN=86
    THROW=87
    TIES=88
    TIMESTAMP=89
    TO=90
    TOP=91
    TOTALS=92
    TRAILING=93
    TRIM=94
    TRUNCATE=95
    TRY=96
    UNBOUNDED=97
    UNION=98
    USING=99
    WEEK=100
    WHEN=101
    WHERE=102
    WHILE=103
    WINDOW=104
    WITH=105
    YEAR=106
    ESCAPE_CHAR_COMMON=107
    IDENTIFIER=108
    FLOATING_LITERAL=109
    OCTAL_LITERAL=110
    DECIMAL_LITERAL=111
    HEXADECIMAL_LITERAL=112
    STRING_LITERAL=113
    ARROW=114
    ASTERISK=115
    BACKQUOTE=116
    BACKSLASH=117
    COLON=118
    COMMA=119
    CONCAT=120
    DASH=121
    DOLLAR=122
    DOT=123
    EQ_DOUBLE=124
    EQ_SINGLE=125
    GT_EQ=126
    GT=127
    HASH=128
    IREGEX_SINGLE=129
    IREGEX_DOUBLE=130
    LBRACE=131
    LBRACKET=132
    LPAREN=133
    LT_EQ=134
    LT=135
    LT_SLASH=136
    NOT_EQ=137
    NOT_IREGEX=138
    NOT_REGEX=139
    NULL_PROPERTY=140
    NULLISH=141
    PERCENT=142
    PLUS=143
    QUERY=144
    QUOTE_DOUBLE=145
    QUOTE_SINGLE_TEMPLATE=146
    QUOTE_SINGLE_TEMPLATE_FULL=147
    QUOTE_SINGLE=148
    REGEX_SINGLE=149
    REGEX_DOUBLE=150
    RBRACE=151
    RBRACKET=152
    RPAREN=153
    SEMICOLON=154
    SLASH=155
    SLASH_GT=156
    UNDERSCORE=157
    MULTI_LINE_COMMENT=158
    SINGLE_LINE_COMMENT=159
    WHITESPACE=160
    STRING_TEXT=161
    STRING_ESCAPE_TRIGGER=162
    FULL_STRING_TEXT=163
    FULL_STRING_ESCAPE_TRIGGER=164
    TAG_WS=165
    TAGC_WS=166
    HOGQLX_TEXT_TEXT=167
    HOGQLX_TEXT_WS=168

    def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.13.2")
        self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
        self._predicates = None




    class ProgramContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def EOF(self):
            return self.getToken(HogQLParser.EOF, 0)

        def declaration(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.DeclarationContext)
            else:
                return self.getTypedRuleContext(HogQLParser.DeclarationContext,i)


        def getRuleIndex(self):
            return HogQLParser.RULE_program

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitProgram" ):
                return visitor.visitProgram(self)
            else:
                return visitor.visitChildren(self)




    def program(self):

        localctx = HogQLParser.ProgramContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_program)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 185
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & -140738696331266) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944844006785023) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 8425495) != 0):
                self.state = 182
                self.declaration()
                self.state = 187
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 188
            self.match(HogQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DeclarationContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def varDecl(self):
            return self.getTypedRuleContext(HogQLParser.VarDeclContext,0)


        def statement(self):
            return self.getTypedRuleContext(HogQLParser.StatementContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_declaration

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitDeclaration" ):
                return visitor.visitDeclaration(self)
            else:
                return visitor.visitChildren(self)




    def declaration(self):

        localctx = HogQLParser.DeclarationContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_declaration)
        try:
            self.state = 192
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [55]:
                self.enterOuterAlt(localctx, 1)
                self.state = 190
                self.varDecl()
                pass
            elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 109, 110, 111, 112, 113, 115, 121, 123, 131, 132, 133, 135, 143, 146, 154]:
                self.enterOuterAlt(localctx, 2)
                self.state = 191
                self.statement()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExpressionContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_expression

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitExpression" ):
                return visitor.visitExpression(self)
            else:
                return visitor.visitChildren(self)




    def expression(self):

        localctx = HogQLParser.ExpressionContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_expression)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 194
            self.columnExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class VarDeclContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LET(self):
            return self.getToken(HogQLParser.LET, 0)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def COLON(self):
            return self.getToken(HogQLParser.COLON, 0)

        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_varDecl

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitVarDecl" ):
                return visitor.visitVarDecl(self)
            else:
                return visitor.visitChildren(self)




    def varDecl(self):

        localctx = HogQLParser.VarDeclContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_varDecl)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 196
            self.match(HogQLParser.LET)
            self.state = 197
            self.identifier()
            self.state = 201
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==118:
                self.state = 198
                self.match(HogQLParser.COLON)
                self.state = 199
                self.match(HogQLParser.EQ_SINGLE)
                self.state = 200
                self.expression()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IdentifierListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_identifierList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitIdentifierList" ):
                return visitor.visitIdentifierList(self)
            else:
                return visitor.visitChildren(self)




    def identifierList(self):

        localctx = HogQLParser.IdentifierListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_identifierList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 203
            self.identifier()
            self.state = 208
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,3,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 204
                    self.match(HogQLParser.COMMA)
                    self.state = 205
                    self.identifier() 
                self.state = 210
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,3,self._ctx)

            self.state = 212
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==119:
                self.state = 211
                self.match(HogQLParser.COMMA)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StatementContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def returnStmt(self):
            return self.getTypedRuleContext(HogQLParser.ReturnStmtContext,0)


        def throwStmt(self):
            return self.getTypedRuleContext(HogQLParser.ThrowStmtContext,0)


        def tryCatchStmt(self):
            return self.getTypedRuleContext(HogQLParser.TryCatchStmtContext,0)


        def ifStmt(self):
            return self.getTypedRuleContext(HogQLParser.IfStmtContext,0)


        def whileStmt(self):
            return self.getTypedRuleContext(HogQLParser.WhileStmtContext,0)


        def forInStmt(self):
            return self.getTypedRuleContext(HogQLParser.ForInStmtContext,0)


        def forStmt(self):
            return self.getTypedRuleContext(HogQLParser.ForStmtContext,0)


        def funcStmt(self):
            return self.getTypedRuleContext(HogQLParser.FuncStmtContext,0)


        def varAssignment(self):
            return self.getTypedRuleContext(HogQLParser.VarAssignmentContext,0)


        def block(self):
            return self.getTypedRuleContext(HogQLParser.BlockContext,0)


        def exprStmt(self):
            return self.getTypedRuleContext(HogQLParser.ExprStmtContext,0)


        def emptyStmt(self):
            return self.getTypedRuleContext(HogQLParser.EmptyStmtContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_statement

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitStatement" ):
                return visitor.visitStatement(self)
            else:
                return visitor.visitChildren(self)




    def statement(self):

        localctx = HogQLParser.StatementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_statement)
        try:
            self.state = 226
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,5,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 214
                self.returnStmt()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 215
                self.throwStmt()
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 216
                self.tryCatchStmt()
                pass

            elif la_ == 4:
                self.enterOuterAlt(localctx, 4)
                self.state = 217
                self.ifStmt()
                pass

            elif la_ == 5:
                self.enterOuterAlt(localctx, 5)
                self.state = 218
                self.whileStmt()
                pass

            elif la_ == 6:
                self.enterOuterAlt(localctx, 6)
                self.state = 219
                self.forInStmt()
                pass

            elif la_ == 7:
                self.enterOuterAlt(localctx, 7)
                self.state = 220
                self.forStmt()
                pass

            elif la_ == 8:
                self.enterOuterAlt(localctx, 8)
                self.state = 221
                self.funcStmt()
                pass

            elif la_ == 9:
                self.enterOuterAlt(localctx, 9)
                self.state = 222
                self.varAssignment()
                pass

            elif la_ == 10:
                self.enterOuterAlt(localctx, 10)
                self.state = 223
                self.block()
                pass

            elif la_ == 11:
                self.enterOuterAlt(localctx, 11)
                self.state = 224
                self.exprStmt()
                pass

            elif la_ == 12:
                self.enterOuterAlt(localctx, 12)
                self.state = 225
                self.emptyStmt()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ReturnStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def RETURN(self):
            return self.getToken(HogQLParser.RETURN, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_returnStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitReturnStmt" ):
                return visitor.visitReturnStmt(self)
            else:
                return visitor.visitChildren(self)




    def returnStmt(self):

        localctx = HogQLParser.ReturnStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_returnStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 228
            self.match(HogQLParser.RETURN)
            self.state = 230
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,6,self._ctx)
            if la_ == 1:
                self.state = 229
                self.expression()


            self.state = 233
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,7,self._ctx)
            if la_ == 1:
                self.state = 232
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ThrowStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def THROW(self):
            return self.getToken(HogQLParser.THROW, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_throwStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitThrowStmt" ):
                return visitor.visitThrowStmt(self)
            else:
                return visitor.visitChildren(self)




    def throwStmt(self):

        localctx = HogQLParser.ThrowStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_throwStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 235
            self.match(HogQLParser.THROW)
            self.state = 237
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,8,self._ctx)
            if la_ == 1:
                self.state = 236
                self.expression()


            self.state = 240
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,9,self._ctx)
            if la_ == 1:
                self.state = 239
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class CatchBlockContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.catchVar = None # IdentifierContext
            self.catchType = None # IdentifierContext
            self.catchStmt = None # BlockContext

        def CATCH(self):
            return self.getToken(HogQLParser.CATCH, 0)

        def block(self):
            return self.getTypedRuleContext(HogQLParser.BlockContext,0)


        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def COLON(self):
            return self.getToken(HogQLParser.COLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_catchBlock

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitCatchBlock" ):
                return visitor.visitCatchBlock(self)
            else:
                return visitor.visitChildren(self)




    def catchBlock(self):

        localctx = HogQLParser.CatchBlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_catchBlock)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 242
            self.match(HogQLParser.CATCH)
            self.state = 251
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==133:
                self.state = 243
                self.match(HogQLParser.LPAREN)
                self.state = 244
                localctx.catchVar = self.identifier()
                self.state = 247
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==118:
                    self.state = 245
                    self.match(HogQLParser.COLON)
                    self.state = 246
                    localctx.catchType = self.identifier()


                self.state = 249
                self.match(HogQLParser.RPAREN)


            self.state = 253
            localctx.catchStmt = self.block()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TryCatchStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.tryStmt = None # BlockContext
            self.finallyStmt = None # BlockContext

        def TRY(self):
            return self.getToken(HogQLParser.TRY, 0)

        def block(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.BlockContext)
            else:
                return self.getTypedRuleContext(HogQLParser.BlockContext,i)


        def catchBlock(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.CatchBlockContext)
            else:
                return self.getTypedRuleContext(HogQLParser.CatchBlockContext,i)


        def FINALLY(self):
            return self.getToken(HogQLParser.FINALLY, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_tryCatchStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTryCatchStmt" ):
                return visitor.visitTryCatchStmt(self)
            else:
                return visitor.visitChildren(self)




    def tryCatchStmt(self):

        localctx = HogQLParser.TryCatchStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_tryCatchStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 255
            self.match(HogQLParser.TRY)
            self.state = 256
            localctx.tryStmt = self.block()
            self.state = 260
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==14:
                self.state = 257
                self.catchBlock()
                self.state = 262
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 265
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==30:
                self.state = 263
                self.match(HogQLParser.FINALLY)
                self.state = 264
                localctx.finallyStmt = self.block()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IfStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def IF(self):
            return self.getToken(HogQLParser.IF, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def statement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.StatementContext)
            else:
                return self.getTypedRuleContext(HogQLParser.StatementContext,i)


        def ELSE(self):
            return self.getToken(HogQLParser.ELSE, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_ifStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitIfStmt" ):
                return visitor.visitIfStmt(self)
            else:
                return visitor.visitChildren(self)




    def ifStmt(self):

        localctx = HogQLParser.IfStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_ifStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 267
            self.match(HogQLParser.IF)
            self.state = 268
            self.match(HogQLParser.LPAREN)
            self.state = 269
            self.expression()
            self.state = 270
            self.match(HogQLParser.RPAREN)
            self.state = 271
            self.statement()
            self.state = 274
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,14,self._ctx)
            if la_ == 1:
                self.state = 272
                self.match(HogQLParser.ELSE)
                self.state = 273
                self.statement()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WhileStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def WHILE(self):
            return self.getToken(HogQLParser.WHILE, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def statement(self):
            return self.getTypedRuleContext(HogQLParser.StatementContext,0)


        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_whileStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWhileStmt" ):
                return visitor.visitWhileStmt(self)
            else:
                return visitor.visitChildren(self)




    def whileStmt(self):

        localctx = HogQLParser.WhileStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_whileStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 276
            self.match(HogQLParser.WHILE)
            self.state = 277
            self.match(HogQLParser.LPAREN)
            self.state = 278
            self.expression()
            self.state = 279
            self.match(HogQLParser.RPAREN)
            self.state = 280
            self.statement()
            self.state = 282
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,15,self._ctx)
            if la_ == 1:
                self.state = 281
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ForStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.initializerVarDeclr = None # VarDeclContext
            self.initializerVarAssignment = None # VarAssignmentContext
            self.initializerExpression = None # ExpressionContext
            self.condition = None # ExpressionContext
            self.incrementVarDeclr = None # VarDeclContext
            self.incrementVarAssignment = None # VarAssignmentContext
            self.incrementExpression = None # ExpressionContext

        def FOR(self):
            return self.getToken(HogQLParser.FOR, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def SEMICOLON(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.SEMICOLON)
            else:
                return self.getToken(HogQLParser.SEMICOLON, i)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def statement(self):
            return self.getTypedRuleContext(HogQLParser.StatementContext,0)


        def varDecl(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.VarDeclContext)
            else:
                return self.getTypedRuleContext(HogQLParser.VarDeclContext,i)


        def varAssignment(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.VarAssignmentContext)
            else:
                return self.getTypedRuleContext(HogQLParser.VarAssignmentContext,i)


        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ExpressionContext,i)


        def getRuleIndex(self):
            return HogQLParser.RULE_forStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitForStmt" ):
                return visitor.visitForStmt(self)
            else:
                return visitor.visitChildren(self)




    def forStmt(self):

        localctx = HogQLParser.ForStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_forStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 284
            self.match(HogQLParser.FOR)
            self.state = 285
            self.match(HogQLParser.LPAREN)
            self.state = 289
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,16,self._ctx)
            if la_ == 1:
                self.state = 286
                localctx.initializerVarDeclr = self.varDecl()

            elif la_ == 2:
                self.state = 287
                localctx.initializerVarAssignment = self.varAssignment()

            elif la_ == 3:
                self.state = 288
                localctx.initializerExpression = self.expression()


            self.state = 291
            self.match(HogQLParser.SEMICOLON)
            self.state = 293
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                self.state = 292
                localctx.condition = self.expression()


            self.state = 295
            self.match(HogQLParser.SEMICOLON)
            self.state = 299
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,18,self._ctx)
            if la_ == 1:
                self.state = 296
                localctx.incrementVarDeclr = self.varDecl()

            elif la_ == 2:
                self.state = 297
                localctx.incrementVarAssignment = self.varAssignment()

            elif la_ == 3:
                self.state = 298
                localctx.incrementExpression = self.expression()


            self.state = 301
            self.match(HogQLParser.RPAREN)
            self.state = 302
            self.statement()
            self.state = 304
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
            if la_ == 1:
                self.state = 303
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ForInStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def FOR(self):
            return self.getToken(HogQLParser.FOR, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def LET(self):
            return self.getToken(HogQLParser.LET, 0)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def IN(self):
            return self.getToken(HogQLParser.IN, 0)

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def statement(self):
            return self.getTypedRuleContext(HogQLParser.StatementContext,0)


        def COMMA(self):
            return self.getToken(HogQLParser.COMMA, 0)

        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_forInStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitForInStmt" ):
                return visitor.visitForInStmt(self)
            else:
                return visitor.visitChildren(self)




    def forInStmt(self):

        localctx = HogQLParser.ForInStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_forInStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 306
            self.match(HogQLParser.FOR)
            self.state = 307
            self.match(HogQLParser.LPAREN)
            self.state = 308
            self.match(HogQLParser.LET)
            self.state = 309
            self.identifier()
            self.state = 312
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==119:
                self.state = 310
                self.match(HogQLParser.COMMA)
                self.state = 311
                self.identifier()


            self.state = 314
            self.match(HogQLParser.IN)
            self.state = 315
            self.expression()
            self.state = 316
            self.match(HogQLParser.RPAREN)
            self.state = 317
            self.statement()
            self.state = 319
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,21,self._ctx)
            if la_ == 1:
                self.state = 318
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FuncStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def block(self):
            return self.getTypedRuleContext(HogQLParser.BlockContext,0)


        def FN(self):
            return self.getToken(HogQLParser.FN, 0)

        def FUN(self):
            return self.getToken(HogQLParser.FUN, 0)

        def identifierList(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_funcStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFuncStmt" ):
                return visitor.visitFuncStmt(self)
            else:
                return visitor.visitChildren(self)




    def funcStmt(self):

        localctx = HogQLParser.FuncStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_funcStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 321
            _la = self._input.LA(1)
            if not(_la==32 or _la==37):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 322
            self.identifier()
            self.state = 323
            self.match(HogQLParser.LPAREN)
            self.state = 325
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & -5800812384855539714) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 25834219896831) != 0):
                self.state = 324
                self.identifierList()


            self.state = 327
            self.match(HogQLParser.RPAREN)
            self.state = 328
            self.block()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class VarAssignmentContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ExpressionContext,i)


        def COLON(self):
            return self.getToken(HogQLParser.COLON, 0)

        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_varAssignment

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitVarAssignment" ):
                return visitor.visitVarAssignment(self)
            else:
                return visitor.visitChildren(self)




    def varAssignment(self):

        localctx = HogQLParser.VarAssignmentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_varAssignment)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 330
            self.expression()
            self.state = 331
            self.match(HogQLParser.COLON)
            self.state = 332
            self.match(HogQLParser.EQ_SINGLE)
            self.state = 333
            self.expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExprStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def expression(self):
            return self.getTypedRuleContext(HogQLParser.ExpressionContext,0)


        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_exprStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitExprStmt" ):
                return visitor.visitExprStmt(self)
            else:
                return visitor.visitChildren(self)




    def exprStmt(self):

        localctx = HogQLParser.ExprStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_exprStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 335
            self.expression()
            self.state = 337
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,23,self._ctx)
            if la_ == 1:
                self.state = 336
                self.match(HogQLParser.SEMICOLON)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class EmptyStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_emptyStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitEmptyStmt" ):
                return visitor.visitEmptyStmt(self)
            else:
                return visitor.visitChildren(self)




    def emptyStmt(self):

        localctx = HogQLParser.EmptyStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_emptyStmt)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 339
            self.match(HogQLParser.SEMICOLON)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class BlockContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LBRACE(self):
            return self.getToken(HogQLParser.LBRACE, 0)

        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def declaration(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.DeclarationContext)
            else:
                return self.getTypedRuleContext(HogQLParser.DeclarationContext,i)


        def getRuleIndex(self):
            return HogQLParser.RULE_block

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitBlock" ):
                return visitor.visitBlock(self)
            else:
                return visitor.visitChildren(self)




    def block(self):

        localctx = HogQLParser.BlockContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_block)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 341
            self.match(HogQLParser.LBRACE)
            self.state = 345
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & -140738696331266) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944844006785023) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 8425495) != 0):
                self.state = 342
                self.declaration()
                self.state = 347
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 348
            self.match(HogQLParser.RBRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class KvPairContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def expression(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ExpressionContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ExpressionContext,i)


        def COLON(self):
            return self.getToken(HogQLParser.COLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_kvPair

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitKvPair" ):
                return visitor.visitKvPair(self)
            else:
                return visitor.visitChildren(self)




    def kvPair(self):

        localctx = HogQLParser.KvPairContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_kvPair)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 350
            self.expression()
            self.state = 351
            self.match(HogQLParser.COLON)
            self.state = 352
            self.expression()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class KvPairListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def kvPair(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.KvPairContext)
            else:
                return self.getTypedRuleContext(HogQLParser.KvPairContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_kvPairList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitKvPairList" ):
                return visitor.visitKvPairList(self)
            else:
                return visitor.visitChildren(self)




    def kvPairList(self):

        localctx = HogQLParser.KvPairListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_kvPairList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 354
            self.kvPair()
            self.state = 359
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,25,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 355
                    self.match(HogQLParser.COMMA)
                    self.state = 356
                    self.kvPair() 
                self.state = 361
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,25,self._ctx)

            self.state = 363
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==119:
                self.state = 362
                self.match(HogQLParser.COMMA)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SelectContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def EOF(self):
            return self.getToken(HogQLParser.EOF, 0)

        def selectSetStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectSetStmtContext,0)


        def selectStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectStmtContext,0)


        def hogqlxTagElement(self):
            return self.getTypedRuleContext(HogQLParser.HogqlxTagElementContext,0)


        def SEMICOLON(self):
            return self.getToken(HogQLParser.SEMICOLON, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_select

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSelect" ):
                return visitor.visitSelect(self)
            else:
                return visitor.visitChildren(self)




    def select(self):

        localctx = HogQLParser.SelectContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_select)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 368
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,27,self._ctx)
            if la_ == 1:
                self.state = 365
                self.selectSetStmt()
                pass

            elif la_ == 2:
                self.state = 366
                self.selectStmt()
                pass

            elif la_ == 3:
                self.state = 367
                self.hogqlxTagElement()
                pass


            self.state = 371
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==154:
                self.state = 370
                self.match(HogQLParser.SEMICOLON)


            self.state = 373
            self.match(HogQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SelectStmtWithParensContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def selectStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectStmtContext,0)


        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def selectSetStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectSetStmtContext,0)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def placeholder(self):
            return self.getTypedRuleContext(HogQLParser.PlaceholderContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_selectStmtWithParens

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSelectStmtWithParens" ):
                return visitor.visitSelectStmtWithParens(self)
            else:
                return visitor.visitChildren(self)




    def selectStmtWithParens(self):

        localctx = HogQLParser.SelectStmtWithParensContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_selectStmtWithParens)
        try:
            self.state = 381
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [82, 105]:
                self.enterOuterAlt(localctx, 1)
                self.state = 375
                self.selectStmt()
                pass
            elif token in [133]:
                self.enterOuterAlt(localctx, 2)
                self.state = 376
                self.match(HogQLParser.LPAREN)
                self.state = 377
                self.selectSetStmt()
                self.state = 378
                self.match(HogQLParser.RPAREN)
                pass
            elif token in [131]:
                self.enterOuterAlt(localctx, 3)
                self.state = 380
                self.placeholder()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SubsequentSelectSetClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def selectStmtWithParens(self):
            return self.getTypedRuleContext(HogQLParser.SelectStmtWithParensContext,0)


        def EXCEPT(self):
            return self.getToken(HogQLParser.EXCEPT, 0)

        def UNION(self):
            return self.getToken(HogQLParser.UNION, 0)

        def ALL(self):
            return self.getToken(HogQLParser.ALL, 0)

        def DISTINCT(self):
            return self.getToken(HogQLParser.DISTINCT, 0)

        def INTERSECT(self):
            return self.getToken(HogQLParser.INTERSECT, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_subsequentSelectSetClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSubsequentSelectSetClause" ):
                return visitor.visitSubsequentSelectSetClause(self)
            else:
                return visitor.visitChildren(self)




    def subsequentSelectSetClause(self):

        localctx = HogQLParser.SubsequentSelectSetClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_subsequentSelectSetClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 391
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,30,self._ctx)
            if la_ == 1:
                self.state = 383
                self.match(HogQLParser.EXCEPT)
                pass

            elif la_ == 2:
                self.state = 384
                self.match(HogQLParser.UNION)
                self.state = 385
                self.match(HogQLParser.ALL)
                pass

            elif la_ == 3:
                self.state = 386
                self.match(HogQLParser.UNION)
                self.state = 387
                self.match(HogQLParser.DISTINCT)
                pass

            elif la_ == 4:
                self.state = 388
                self.match(HogQLParser.INTERSECT)
                pass

            elif la_ == 5:
                self.state = 389
                self.match(HogQLParser.INTERSECT)
                self.state = 390
                self.match(HogQLParser.DISTINCT)
                pass


            self.state = 393
            self.selectStmtWithParens()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SelectSetStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def selectStmtWithParens(self):
            return self.getTypedRuleContext(HogQLParser.SelectStmtWithParensContext,0)


        def subsequentSelectSetClause(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.SubsequentSelectSetClauseContext)
            else:
                return self.getTypedRuleContext(HogQLParser.SubsequentSelectSetClauseContext,i)


        def getRuleIndex(self):
            return HogQLParser.RULE_selectSetStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSelectSetStmt" ):
                return visitor.visitSelectSetStmt(self)
            else:
                return visitor.visitChildren(self)




    def selectSetStmt(self):

        localctx = HogQLParser.SelectSetStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_selectSetStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 395
            self.selectStmtWithParens()
            self.state = 399
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==27 or _la==47 or _la==98:
                self.state = 396
                self.subsequentSelectSetClause()
                self.state = 401
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SelectStmtContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser
            self.with_ = None # WithClauseContext
            self.columns = None # ColumnExprListContext
            self.from_ = None # FromClauseContext
            self.where = None # WhereClauseContext

        def SELECT(self):
            return self.getToken(HogQLParser.SELECT, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def DISTINCT(self):
            return self.getToken(HogQLParser.DISTINCT, 0)

        def topClause(self):
            return self.getTypedRuleContext(HogQLParser.TopClauseContext,0)


        def arrayJoinClause(self):
            return self.getTypedRuleContext(HogQLParser.ArrayJoinClauseContext,0)


        def prewhereClause(self):
            return self.getTypedRuleContext(HogQLParser.PrewhereClauseContext,0)


        def groupByClause(self):
            return self.getTypedRuleContext(HogQLParser.GroupByClauseContext,0)


        def WITH(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.WITH)
            else:
                return self.getToken(HogQLParser.WITH, i)

        def TOTALS(self):
            return self.getToken(HogQLParser.TOTALS, 0)

        def havingClause(self):
            return self.getTypedRuleContext(HogQLParser.HavingClauseContext,0)


        def windowClause(self):
            return self.getTypedRuleContext(HogQLParser.WindowClauseContext,0)


        def orderByClause(self):
            return self.getTypedRuleContext(HogQLParser.OrderByClauseContext,0)


        def limitByClause(self):
            return self.getTypedRuleContext(HogQLParser.LimitByClauseContext,0)


        def limitAndOffsetClause(self):
            return self.getTypedRuleContext(HogQLParser.LimitAndOffsetClauseContext,0)


        def offsetOnlyClause(self):
            return self.getTypedRuleContext(HogQLParser.OffsetOnlyClauseContext,0)


        def settingsClause(self):
            return self.getTypedRuleContext(HogQLParser.SettingsClauseContext,0)


        def withClause(self):
            return self.getTypedRuleContext(HogQLParser.WithClauseContext,0)


        def fromClause(self):
            return self.getTypedRuleContext(HogQLParser.FromClauseContext,0)


        def whereClause(self):
            return self.getTypedRuleContext(HogQLParser.WhereClauseContext,0)


        def CUBE(self):
            return self.getToken(HogQLParser.CUBE, 0)

        def ROLLUP(self):
            return self.getToken(HogQLParser.ROLLUP, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_selectStmt

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSelectStmt" ):
                return visitor.visitSelectStmt(self)
            else:
                return visitor.visitChildren(self)




    def selectStmt(self):

        localctx = HogQLParser.SelectStmtContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_selectStmt)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 403
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==105:
                self.state = 402
                localctx.with_ = self.withClause()


            self.state = 405
            self.match(HogQLParser.SELECT)
            self.state = 407
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,33,self._ctx)
            if la_ == 1:
                self.state = 406
                self.match(HogQLParser.DISTINCT)


            self.state = 410
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,34,self._ctx)
            if la_ == 1:
                self.state = 409
                self.topClause()


            self.state = 412
            localctx.columns = self.columnExprList()
            self.state = 414
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==35:
                self.state = 413
                localctx.from_ = self.fromClause()


            self.state = 417
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & 18084767253659680) != 0):
                self.state = 416
                self.arrayJoinClause()


            self.state = 420
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==72:
                self.state = 419
                self.prewhereClause()


            self.state = 423
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==102:
                self.state = 422
                localctx.where = self.whereClause()


            self.state = 426
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==38:
                self.state = 425
                self.groupByClause()


            self.state = 430
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,40,self._ctx)
            if la_ == 1:
                self.state = 428
                self.match(HogQLParser.WITH)
                self.state = 429
                _la = self._input.LA(1)
                if not(_la==18 or _la==77):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 434
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==105:
                self.state = 432
                self.match(HogQLParser.WITH)
                self.state = 433
                self.match(HogQLParser.TOTALS)


            self.state = 437
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==39:
                self.state = 436
                self.havingClause()


            self.state = 440
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==104:
                self.state = 439
                self.windowClause()


            self.state = 443
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==67:
                self.state = 442
                self.orderByClause()


            self.state = 446
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,45,self._ctx)
            if la_ == 1:
                self.state = 445
                self.limitByClause()


            self.state = 450
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [57]:
                self.state = 448
                self.limitAndOffsetClause()
                pass
            elif token in [64]:
                self.state = 449
                self.offsetOnlyClause()
                pass
            elif token in [-1, 27, 47, 84, 98, 153, 154]:
                pass
            else:
                pass
            self.state = 453
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==84:
                self.state = 452
                self.settingsClause()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WithClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def WITH(self):
            return self.getToken(HogQLParser.WITH, 0)

        def withExprList(self):
            return self.getTypedRuleContext(HogQLParser.WithExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_withClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWithClause" ):
                return visitor.visitWithClause(self)
            else:
                return visitor.visitChildren(self)




    def withClause(self):

        localctx = HogQLParser.WithClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_withClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 455
            self.match(HogQLParser.WITH)
            self.state = 456
            self.withExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TopClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def TOP(self):
            return self.getToken(HogQLParser.TOP, 0)

        def DECIMAL_LITERAL(self):
            return self.getToken(HogQLParser.DECIMAL_LITERAL, 0)

        def WITH(self):
            return self.getToken(HogQLParser.WITH, 0)

        def TIES(self):
            return self.getToken(HogQLParser.TIES, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_topClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTopClause" ):
                return visitor.visitTopClause(self)
            else:
                return visitor.visitChildren(self)




    def topClause(self):

        localctx = HogQLParser.TopClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_topClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 458
            self.match(HogQLParser.TOP)
            self.state = 459
            self.match(HogQLParser.DECIMAL_LITERAL)
            self.state = 462
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,48,self._ctx)
            if la_ == 1:
                self.state = 460
                self.match(HogQLParser.WITH)
                self.state = 461
                self.match(HogQLParser.TIES)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FromClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def FROM(self):
            return self.getToken(HogQLParser.FROM, 0)

        def joinExpr(self):
            return self.getTypedRuleContext(HogQLParser.JoinExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_fromClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFromClause" ):
                return visitor.visitFromClause(self)
            else:
                return visitor.visitChildren(self)




    def fromClause(self):

        localctx = HogQLParser.FromClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_fromClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 464
            self.match(HogQLParser.FROM)
            self.state = 465
            self.joinExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ArrayJoinClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ARRAY(self):
            return self.getToken(HogQLParser.ARRAY, 0)

        def JOIN(self):
            return self.getToken(HogQLParser.JOIN, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def LEFT(self):
            return self.getToken(HogQLParser.LEFT, 0)

        def INNER(self):
            return self.getToken(HogQLParser.INNER, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_arrayJoinClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitArrayJoinClause" ):
                return visitor.visitArrayJoinClause(self)
            else:
                return visitor.visitChildren(self)




    def arrayJoinClause(self):

        localctx = HogQLParser.ArrayJoinClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_arrayJoinClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 468
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==46 or _la==54:
                self.state = 467
                _la = self._input.LA(1)
                if not(_la==46 or _la==54):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 470
            self.match(HogQLParser.ARRAY)
            self.state = 471
            self.match(HogQLParser.JOIN)
            self.state = 472
            self.columnExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WindowClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def WINDOW(self):
            return self.getToken(HogQLParser.WINDOW, 0)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def AS(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.AS)
            else:
                return self.getToken(HogQLParser.AS, i)

        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.LPAREN)
            else:
                return self.getToken(HogQLParser.LPAREN, i)

        def windowExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.WindowExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.WindowExprContext,i)


        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.RPAREN)
            else:
                return self.getToken(HogQLParser.RPAREN, i)

        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_windowClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWindowClause" ):
                return visitor.visitWindowClause(self)
            else:
                return visitor.visitChildren(self)




    def windowClause(self):

        localctx = HogQLParser.WindowClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_windowClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 474
            self.match(HogQLParser.WINDOW)
            self.state = 475
            self.identifier()
            self.state = 476
            self.match(HogQLParser.AS)
            self.state = 477
            self.match(HogQLParser.LPAREN)
            self.state = 478
            self.windowExpr()
            self.state = 479
            self.match(HogQLParser.RPAREN)
            self.state = 489
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==119:
                self.state = 480
                self.match(HogQLParser.COMMA)
                self.state = 481
                self.identifier()
                self.state = 482
                self.match(HogQLParser.AS)
                self.state = 483
                self.match(HogQLParser.LPAREN)
                self.state = 484
                self.windowExpr()
                self.state = 485
                self.match(HogQLParser.RPAREN)
                self.state = 491
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PrewhereClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def PREWHERE(self):
            return self.getToken(HogQLParser.PREWHERE, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_prewhereClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitPrewhereClause" ):
                return visitor.visitPrewhereClause(self)
            else:
                return visitor.visitChildren(self)




    def prewhereClause(self):

        localctx = HogQLParser.PrewhereClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 62, self.RULE_prewhereClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 492
            self.match(HogQLParser.PREWHERE)
            self.state = 493
            self.columnExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WhereClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def WHERE(self):
            return self.getToken(HogQLParser.WHERE, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_whereClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWhereClause" ):
                return visitor.visitWhereClause(self)
            else:
                return visitor.visitChildren(self)




    def whereClause(self):

        localctx = HogQLParser.WhereClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 64, self.RULE_whereClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 495
            self.match(HogQLParser.WHERE)
            self.state = 496
            self.columnExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class GroupByClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def GROUP(self):
            return self.getToken(HogQLParser.GROUP, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def CUBE(self):
            return self.getToken(HogQLParser.CUBE, 0)

        def ROLLUP(self):
            return self.getToken(HogQLParser.ROLLUP, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_groupByClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitGroupByClause" ):
                return visitor.visitGroupByClause(self)
            else:
                return visitor.visitChildren(self)




    def groupByClause(self):

        localctx = HogQLParser.GroupByClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 66, self.RULE_groupByClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 498
            self.match(HogQLParser.GROUP)
            self.state = 499
            self.match(HogQLParser.BY)
            self.state = 506
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,51,self._ctx)
            if la_ == 1:
                self.state = 500
                _la = self._input.LA(1)
                if not(_la==18 or _la==77):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 501
                self.match(HogQLParser.LPAREN)
                self.state = 502
                self.columnExprList()
                self.state = 503
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 2:
                self.state = 505
                self.columnExprList()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HavingClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HAVING(self):
            return self.getToken(HogQLParser.HAVING, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_havingClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHavingClause" ):
                return visitor.visitHavingClause(self)
            else:
                return visitor.visitChildren(self)




    def havingClause(self):

        localctx = HogQLParser.HavingClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 68, self.RULE_havingClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 508
            self.match(HogQLParser.HAVING)
            self.state = 509
            self.columnExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OrderByClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ORDER(self):
            return self.getToken(HogQLParser.ORDER, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def orderExprList(self):
            return self.getTypedRuleContext(HogQLParser.OrderExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_orderByClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOrderByClause" ):
                return visitor.visitOrderByClause(self)
            else:
                return visitor.visitChildren(self)




    def orderByClause(self):

        localctx = HogQLParser.OrderByClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 70, self.RULE_orderByClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 511
            self.match(HogQLParser.ORDER)
            self.state = 512
            self.match(HogQLParser.BY)
            self.state = 513
            self.orderExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ProjectionOrderByClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ORDER(self):
            return self.getToken(HogQLParser.ORDER, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_projectionOrderByClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitProjectionOrderByClause" ):
                return visitor.visitProjectionOrderByClause(self)
            else:
                return visitor.visitChildren(self)




    def projectionOrderByClause(self):

        localctx = HogQLParser.ProjectionOrderByClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 72, self.RULE_projectionOrderByClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 515
            self.match(HogQLParser.ORDER)
            self.state = 516
            self.match(HogQLParser.BY)
            self.state = 517
            self.columnExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class LimitByClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LIMIT(self):
            return self.getToken(HogQLParser.LIMIT, 0)

        def limitExpr(self):
            return self.getTypedRuleContext(HogQLParser.LimitExprContext,0)


        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_limitByClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitLimitByClause" ):
                return visitor.visitLimitByClause(self)
            else:
                return visitor.visitChildren(self)




    def limitByClause(self):

        localctx = HogQLParser.LimitByClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 74, self.RULE_limitByClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 519
            self.match(HogQLParser.LIMIT)
            self.state = 520
            self.limitExpr()
            self.state = 521
            self.match(HogQLParser.BY)
            self.state = 522
            self.columnExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class LimitAndOffsetClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LIMIT(self):
            return self.getToken(HogQLParser.LIMIT, 0)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)


        def COMMA(self):
            return self.getToken(HogQLParser.COMMA, 0)

        def WITH(self):
            return self.getToken(HogQLParser.WITH, 0)

        def TIES(self):
            return self.getToken(HogQLParser.TIES, 0)

        def OFFSET(self):
            return self.getToken(HogQLParser.OFFSET, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_limitAndOffsetClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitLimitAndOffsetClause" ):
                return visitor.visitLimitAndOffsetClause(self)
            else:
                return visitor.visitChildren(self)




    def limitAndOffsetClause(self):

        localctx = HogQLParser.LimitAndOffsetClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 76, self.RULE_limitAndOffsetClause)
        self._la = 0 # Token type
        try:
            self.state = 543
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,55,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 524
                self.match(HogQLParser.LIMIT)
                self.state = 525
                self.columnExpr(0)
                self.state = 528
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==119:
                    self.state = 526
                    self.match(HogQLParser.COMMA)
                    self.state = 527
                    self.columnExpr(0)


                self.state = 532
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==105:
                    self.state = 530
                    self.match(HogQLParser.WITH)
                    self.state = 531
                    self.match(HogQLParser.TIES)


                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 534
                self.match(HogQLParser.LIMIT)
                self.state = 535
                self.columnExpr(0)
                self.state = 538
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==105:
                    self.state = 536
                    self.match(HogQLParser.WITH)
                    self.state = 537
                    self.match(HogQLParser.TIES)


                self.state = 540
                self.match(HogQLParser.OFFSET)
                self.state = 541
                self.columnExpr(0)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OffsetOnlyClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def OFFSET(self):
            return self.getToken(HogQLParser.OFFSET, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_offsetOnlyClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOffsetOnlyClause" ):
                return visitor.visitOffsetOnlyClause(self)
            else:
                return visitor.visitChildren(self)




    def offsetOnlyClause(self):

        localctx = HogQLParser.OffsetOnlyClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 78, self.RULE_offsetOnlyClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 545
            self.match(HogQLParser.OFFSET)
            self.state = 546
            self.columnExpr(0)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SettingsClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SETTINGS(self):
            return self.getToken(HogQLParser.SETTINGS, 0)

        def settingExprList(self):
            return self.getTypedRuleContext(HogQLParser.SettingExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_settingsClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSettingsClause" ):
                return visitor.visitSettingsClause(self)
            else:
                return visitor.visitChildren(self)




    def settingsClause(self):

        localctx = HogQLParser.SettingsClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 80, self.RULE_settingsClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 548
            self.match(HogQLParser.SETTINGS)
            self.state = 549
            self.settingExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class JoinExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_joinExpr

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)


    class JoinExprOpContext(JoinExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def joinExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.JoinExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.JoinExprContext,i)

        def JOIN(self):
            return self.getToken(HogQLParser.JOIN, 0)
        def joinConstraintClause(self):
            return self.getTypedRuleContext(HogQLParser.JoinConstraintClauseContext,0)

        def joinOp(self):
            return self.getTypedRuleContext(HogQLParser.JoinOpContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinExprOp" ):
                return visitor.visitJoinExprOp(self)
            else:
                return visitor.visitChildren(self)


    class JoinExprTableContext(JoinExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def tableExpr(self):
            return self.getTypedRuleContext(HogQLParser.TableExprContext,0)

        def FINAL(self):
            return self.getToken(HogQLParser.FINAL, 0)
        def sampleClause(self):
            return self.getTypedRuleContext(HogQLParser.SampleClauseContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinExprTable" ):
                return visitor.visitJoinExprTable(self)
            else:
                return visitor.visitChildren(self)


    class JoinExprParensContext(JoinExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def joinExpr(self):
            return self.getTypedRuleContext(HogQLParser.JoinExprContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinExprParens" ):
                return visitor.visitJoinExprParens(self)
            else:
                return visitor.visitChildren(self)


    class JoinExprCrossOpContext(JoinExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def joinExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.JoinExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.JoinExprContext,i)

        def joinOpCross(self):
            return self.getTypedRuleContext(HogQLParser.JoinOpCrossContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinExprCrossOp" ):
                return visitor.visitJoinExprCrossOp(self)
            else:
                return visitor.visitChildren(self)



    def joinExpr(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = HogQLParser.JoinExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 82
        self.enterRecursionRule(localctx, 82, self.RULE_joinExpr, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 563
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,58,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.JoinExprTableContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 552
                self.tableExpr(0)
                self.state = 554
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,56,self._ctx)
                if la_ == 1:
                    self.state = 553
                    self.match(HogQLParser.FINAL)


                self.state = 557
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,57,self._ctx)
                if la_ == 1:
                    self.state = 556
                    self.sampleClause()


                pass

            elif la_ == 2:
                localctx = HogQLParser.JoinExprParensContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 559
                self.match(HogQLParser.LPAREN)
                self.state = 560
                self.joinExpr(0)
                self.state = 561
                self.match(HogQLParser.RPAREN)
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 579
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,61,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 577
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,60,self._ctx)
                    if la_ == 1:
                        localctx = HogQLParser.JoinExprCrossOpContext(self, HogQLParser.JoinExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_joinExpr)
                        self.state = 565
                        if not self.precpred(self._ctx, 3):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                        self.state = 566
                        self.joinOpCross()
                        self.state = 567
                        self.joinExpr(4)
                        pass

                    elif la_ == 2:
                        localctx = HogQLParser.JoinExprOpContext(self, HogQLParser.JoinExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_joinExpr)
                        self.state = 569
                        if not self.precpred(self._ctx, 4):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 4)")
                        self.state = 571
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if (((_la) & ~0x3f) == 0 and ((1 << _la) & 18084835973136666) != 0) or _la==76 or _la==83:
                            self.state = 570
                            self.joinOp()


                        self.state = 573
                        self.match(HogQLParser.JOIN)
                        self.state = 574
                        self.joinExpr(0)
                        self.state = 575
                        self.joinConstraintClause()
                        pass

             
                self.state = 581
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,61,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx


    class JoinOpContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_joinOp

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class JoinOpFullContext(JoinOpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinOpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def FULL(self):
            return self.getToken(HogQLParser.FULL, 0)
        def OUTER(self):
            return self.getToken(HogQLParser.OUTER, 0)
        def ALL(self):
            return self.getToken(HogQLParser.ALL, 0)
        def ANY(self):
            return self.getToken(HogQLParser.ANY, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinOpFull" ):
                return visitor.visitJoinOpFull(self)
            else:
                return visitor.visitChildren(self)


    class JoinOpInnerContext(JoinOpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinOpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def INNER(self):
            return self.getToken(HogQLParser.INNER, 0)
        def ALL(self):
            return self.getToken(HogQLParser.ALL, 0)
        def ANY(self):
            return self.getToken(HogQLParser.ANY, 0)
        def ASOF(self):
            return self.getToken(HogQLParser.ASOF, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinOpInner" ):
                return visitor.visitJoinOpInner(self)
            else:
                return visitor.visitChildren(self)


    class JoinOpLeftRightContext(JoinOpContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.JoinOpContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LEFT(self):
            return self.getToken(HogQLParser.LEFT, 0)
        def RIGHT(self):
            return self.getToken(HogQLParser.RIGHT, 0)
        def OUTER(self):
            return self.getToken(HogQLParser.OUTER, 0)
        def SEMI(self):
            return self.getToken(HogQLParser.SEMI, 0)
        def ALL(self):
            return self.getToken(HogQLParser.ALL, 0)
        def ANTI(self):
            return self.getToken(HogQLParser.ANTI, 0)
        def ANY(self):
            return self.getToken(HogQLParser.ANY, 0)
        def ASOF(self):
            return self.getToken(HogQLParser.ASOF, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinOpLeftRight" ):
                return visitor.visitJoinOpLeftRight(self)
            else:
                return visitor.visitChildren(self)



    def joinOp(self):

        localctx = HogQLParser.JoinOpContext(self, self._ctx, self.state)
        self.enterRule(localctx, 84, self.RULE_joinOp)
        self._la = 0 # Token type
        try:
            self.state = 625
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,75,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.JoinOpInnerContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 591
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,64,self._ctx)
                if la_ == 1:
                    self.state = 583
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0):
                        self.state = 582
                        _la = self._input.LA(1)
                        if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0)):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    self.state = 585
                    self.match(HogQLParser.INNER)
                    pass

                elif la_ == 2:
                    self.state = 586
                    self.match(HogQLParser.INNER)
                    self.state = 588
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0):
                        self.state = 587
                        _la = self._input.LA(1)
                        if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0)):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    pass

                elif la_ == 3:
                    self.state = 590
                    _la = self._input.LA(1)
                    if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0)):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    pass


                pass

            elif la_ == 2:
                localctx = HogQLParser.JoinOpLeftRightContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 607
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,69,self._ctx)
                if la_ == 1:
                    self.state = 594
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==83:
                        self.state = 593
                        _la = self._input.LA(1)
                        if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==83):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    self.state = 596
                    _la = self._input.LA(1)
                    if not(_la==54 or _la==76):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 598
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==68:
                        self.state = 597
                        self.match(HogQLParser.OUTER)


                    pass

                elif la_ == 2:
                    self.state = 600
                    _la = self._input.LA(1)
                    if not(_la==54 or _la==76):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()
                    self.state = 602
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==68:
                        self.state = 601
                        self.match(HogQLParser.OUTER)


                    self.state = 605
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==83:
                        self.state = 604
                        _la = self._input.LA(1)
                        if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==83):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    pass


                pass

            elif la_ == 3:
                localctx = HogQLParser.JoinOpFullContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 623
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,74,self._ctx)
                if la_ == 1:
                    self.state = 610
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==1 or _la==4:
                        self.state = 609
                        _la = self._input.LA(1)
                        if not(_la==1 or _la==4):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    self.state = 612
                    self.match(HogQLParser.FULL)
                    self.state = 614
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==68:
                        self.state = 613
                        self.match(HogQLParser.OUTER)


                    pass

                elif la_ == 2:
                    self.state = 616
                    self.match(HogQLParser.FULL)
                    self.state = 618
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==68:
                        self.state = 617
                        self.match(HogQLParser.OUTER)


                    self.state = 621
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if _la==1 or _la==4:
                        self.state = 620
                        _la = self._input.LA(1)
                        if not(_la==1 or _la==4):
                            self._errHandler.recoverInline(self)
                        else:
                            self._errHandler.reportMatch(self)
                            self.consume()


                    pass


                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class JoinOpCrossContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def CROSS(self):
            return self.getToken(HogQLParser.CROSS, 0)

        def JOIN(self):
            return self.getToken(HogQLParser.JOIN, 0)

        def COMMA(self):
            return self.getToken(HogQLParser.COMMA, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_joinOpCross

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinOpCross" ):
                return visitor.visitJoinOpCross(self)
            else:
                return visitor.visitChildren(self)




    def joinOpCross(self):

        localctx = HogQLParser.JoinOpCrossContext(self, self._ctx, self.state)
        self.enterRule(localctx, 86, self.RULE_joinOpCross)
        try:
            self.state = 630
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [17]:
                self.enterOuterAlt(localctx, 1)
                self.state = 627
                self.match(HogQLParser.CROSS)
                self.state = 628
                self.match(HogQLParser.JOIN)
                pass
            elif token in [119]:
                self.enterOuterAlt(localctx, 2)
                self.state = 629
                self.match(HogQLParser.COMMA)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class JoinConstraintClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ON(self):
            return self.getToken(HogQLParser.ON, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def USING(self):
            return self.getToken(HogQLParser.USING, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_joinConstraintClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitJoinConstraintClause" ):
                return visitor.visitJoinConstraintClause(self)
            else:
                return visitor.visitChildren(self)




    def joinConstraintClause(self):

        localctx = HogQLParser.JoinConstraintClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 88, self.RULE_joinConstraintClause)
        try:
            self.state = 641
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,77,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 632
                self.match(HogQLParser.ON)
                self.state = 633
                self.columnExprList()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 634
                self.match(HogQLParser.USING)
                self.state = 635
                self.match(HogQLParser.LPAREN)
                self.state = 636
                self.columnExprList()
                self.state = 637
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 639
                self.match(HogQLParser.USING)
                self.state = 640
                self.columnExprList()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SampleClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SAMPLE(self):
            return self.getToken(HogQLParser.SAMPLE, 0)

        def ratioExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.RatioExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.RatioExprContext,i)


        def OFFSET(self):
            return self.getToken(HogQLParser.OFFSET, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_sampleClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSampleClause" ):
                return visitor.visitSampleClause(self)
            else:
                return visitor.visitChildren(self)




    def sampleClause(self):

        localctx = HogQLParser.SampleClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 90, self.RULE_sampleClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 643
            self.match(HogQLParser.SAMPLE)
            self.state = 644
            self.ratioExpr()
            self.state = 647
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,78,self._ctx)
            if la_ == 1:
                self.state = 645
                self.match(HogQLParser.OFFSET)
                self.state = 646
                self.ratioExpr()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class LimitExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)


        def COMMA(self):
            return self.getToken(HogQLParser.COMMA, 0)

        def OFFSET(self):
            return self.getToken(HogQLParser.OFFSET, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_limitExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitLimitExpr" ):
                return visitor.visitLimitExpr(self)
            else:
                return visitor.visitChildren(self)




    def limitExpr(self):

        localctx = HogQLParser.LimitExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 92, self.RULE_limitExpr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 649
            self.columnExpr(0)
            self.state = 652
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==64 or _la==119:
                self.state = 650
                _la = self._input.LA(1)
                if not(_la==64 or _la==119):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 651
                self.columnExpr(0)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OrderExprListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def orderExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.OrderExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.OrderExprContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_orderExprList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOrderExprList" ):
                return visitor.visitOrderExprList(self)
            else:
                return visitor.visitChildren(self)




    def orderExprList(self):

        localctx = HogQLParser.OrderExprListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 94, self.RULE_orderExprList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 654
            self.orderExpr()
            self.state = 659
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==119:
                self.state = 655
                self.match(HogQLParser.COMMA)
                self.state = 656
                self.orderExpr()
                self.state = 661
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class OrderExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def NULLS(self):
            return self.getToken(HogQLParser.NULLS, 0)

        def COLLATE(self):
            return self.getToken(HogQLParser.COLLATE, 0)

        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def ASCENDING(self):
            return self.getToken(HogQLParser.ASCENDING, 0)

        def DESCENDING(self):
            return self.getToken(HogQLParser.DESCENDING, 0)

        def DESC(self):
            return self.getToken(HogQLParser.DESC, 0)

        def FIRST(self):
            return self.getToken(HogQLParser.FIRST, 0)

        def LAST(self):
            return self.getToken(HogQLParser.LAST, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_orderExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitOrderExpr" ):
                return visitor.visitOrderExpr(self)
            else:
                return visitor.visitChildren(self)




    def orderExpr(self):

        localctx = HogQLParser.OrderExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 96, self.RULE_orderExpr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 662
            self.columnExpr(0)
            self.state = 664
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & 12583040) != 0):
                self.state = 663
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 12583040) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 668
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==63:
                self.state = 666
                self.match(HogQLParser.NULLS)
                self.state = 667
                _la = self._input.LA(1)
                if not(_la==31 or _la==52):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 672
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==16:
                self.state = 670
                self.match(HogQLParser.COLLATE)
                self.state = 671
                self.match(HogQLParser.STRING_LITERAL)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class RatioExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def placeholder(self):
            return self.getTypedRuleContext(HogQLParser.PlaceholderContext,0)


        def numberLiteral(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.NumberLiteralContext)
            else:
                return self.getTypedRuleContext(HogQLParser.NumberLiteralContext,i)


        def SLASH(self):
            return self.getToken(HogQLParser.SLASH, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_ratioExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitRatioExpr" ):
                return visitor.visitRatioExpr(self)
            else:
                return visitor.visitChildren(self)




    def ratioExpr(self):

        localctx = HogQLParser.RatioExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 98, self.RULE_ratioExpr)
        try:
            self.state = 680
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [131]:
                self.enterOuterAlt(localctx, 1)
                self.state = 674
                self.placeholder()
                pass
            elif token in [45, 60, 109, 110, 111, 112, 121, 123, 143]:
                self.enterOuterAlt(localctx, 2)
                self.state = 675
                self.numberLiteral()
                self.state = 678
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,84,self._ctx)
                if la_ == 1:
                    self.state = 676
                    self.match(HogQLParser.SLASH)
                    self.state = 677
                    self.numberLiteral()


                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SettingExprListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def settingExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.SettingExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.SettingExprContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_settingExprList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSettingExprList" ):
                return visitor.visitSettingExprList(self)
            else:
                return visitor.visitChildren(self)




    def settingExprList(self):

        localctx = HogQLParser.SettingExprListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 100, self.RULE_settingExprList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 682
            self.settingExpr()
            self.state = 687
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==119:
                self.state = 683
                self.match(HogQLParser.COMMA)
                self.state = 684
                self.settingExpr()
                self.state = 689
                self._errHandler.sync(self)
                _la = self._input.LA(1)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class SettingExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)

        def literal(self):
            return self.getTypedRuleContext(HogQLParser.LiteralContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_settingExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitSettingExpr" ):
                return visitor.visitSettingExpr(self)
            else:
                return visitor.visitChildren(self)




    def settingExpr(self):

        localctx = HogQLParser.SettingExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 102, self.RULE_settingExpr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 690
            self.identifier()
            self.state = 691
            self.match(HogQLParser.EQ_SINGLE)
            self.state = 692
            self.literal()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WindowExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def winPartitionByClause(self):
            return self.getTypedRuleContext(HogQLParser.WinPartitionByClauseContext,0)


        def winOrderByClause(self):
            return self.getTypedRuleContext(HogQLParser.WinOrderByClauseContext,0)


        def winFrameClause(self):
            return self.getTypedRuleContext(HogQLParser.WinFrameClauseContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_windowExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWindowExpr" ):
                return visitor.visitWindowExpr(self)
            else:
                return visitor.visitChildren(self)




    def windowExpr(self):

        localctx = HogQLParser.WindowExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 104, self.RULE_windowExpr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 695
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==70:
                self.state = 694
                self.winPartitionByClause()


            self.state = 698
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==67:
                self.state = 697
                self.winOrderByClause()


            self.state = 701
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==74 or _la==79:
                self.state = 700
                self.winFrameClause()


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WinPartitionByClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def PARTITION(self):
            return self.getToken(HogQLParser.PARTITION, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_winPartitionByClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWinPartitionByClause" ):
                return visitor.visitWinPartitionByClause(self)
            else:
                return visitor.visitChildren(self)




    def winPartitionByClause(self):

        localctx = HogQLParser.WinPartitionByClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 106, self.RULE_winPartitionByClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 703
            self.match(HogQLParser.PARTITION)
            self.state = 704
            self.match(HogQLParser.BY)
            self.state = 705
            self.columnExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WinOrderByClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ORDER(self):
            return self.getToken(HogQLParser.ORDER, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def orderExprList(self):
            return self.getTypedRuleContext(HogQLParser.OrderExprListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_winOrderByClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWinOrderByClause" ):
                return visitor.visitWinOrderByClause(self)
            else:
                return visitor.visitChildren(self)




    def winOrderByClause(self):

        localctx = HogQLParser.WinOrderByClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 108, self.RULE_winOrderByClause)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 707
            self.match(HogQLParser.ORDER)
            self.state = 708
            self.match(HogQLParser.BY)
            self.state = 709
            self.orderExprList()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WinFrameClauseContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def winFrameExtend(self):
            return self.getTypedRuleContext(HogQLParser.WinFrameExtendContext,0)


        def ROWS(self):
            return self.getToken(HogQLParser.ROWS, 0)

        def RANGE(self):
            return self.getToken(HogQLParser.RANGE, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_winFrameClause

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWinFrameClause" ):
                return visitor.visitWinFrameClause(self)
            else:
                return visitor.visitChildren(self)




    def winFrameClause(self):

        localctx = HogQLParser.WinFrameClauseContext(self, self._ctx, self.state)
        self.enterRule(localctx, 110, self.RULE_winFrameClause)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 711
            _la = self._input.LA(1)
            if not(_la==74 or _la==79):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 712
            self.winFrameExtend()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WinFrameExtendContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_winFrameExtend

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class FrameStartContext(WinFrameExtendContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.WinFrameExtendContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def winFrameBound(self):
            return self.getTypedRuleContext(HogQLParser.WinFrameBoundContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFrameStart" ):
                return visitor.visitFrameStart(self)
            else:
                return visitor.visitChildren(self)


    class FrameBetweenContext(WinFrameExtendContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.WinFrameExtendContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def BETWEEN(self):
            return self.getToken(HogQLParser.BETWEEN, 0)
        def winFrameBound(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.WinFrameBoundContext)
            else:
                return self.getTypedRuleContext(HogQLParser.WinFrameBoundContext,i)

        def AND(self):
            return self.getToken(HogQLParser.AND, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFrameBetween" ):
                return visitor.visitFrameBetween(self)
            else:
                return visitor.visitChildren(self)



    def winFrameExtend(self):

        localctx = HogQLParser.WinFrameExtendContext(self, self._ctx, self.state)
        self.enterRule(localctx, 112, self.RULE_winFrameExtend)
        try:
            self.state = 720
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [19, 45, 60, 97, 109, 110, 111, 112, 121, 123, 143]:
                localctx = HogQLParser.FrameStartContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 714
                self.winFrameBound()
                pass
            elif token in [9]:
                localctx = HogQLParser.FrameBetweenContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 715
                self.match(HogQLParser.BETWEEN)
                self.state = 716
                self.winFrameBound()
                self.state = 717
                self.match(HogQLParser.AND)
                self.state = 718
                self.winFrameBound()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WinFrameBoundContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def CURRENT(self):
            return self.getToken(HogQLParser.CURRENT, 0)

        def ROW(self):
            return self.getToken(HogQLParser.ROW, 0)

        def UNBOUNDED(self):
            return self.getToken(HogQLParser.UNBOUNDED, 0)

        def PRECEDING(self):
            return self.getToken(HogQLParser.PRECEDING, 0)

        def FOLLOWING(self):
            return self.getToken(HogQLParser.FOLLOWING, 0)

        def numberLiteral(self):
            return self.getTypedRuleContext(HogQLParser.NumberLiteralContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_winFrameBound

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWinFrameBound" ):
                return visitor.visitWinFrameBound(self)
            else:
                return visitor.visitChildren(self)




    def winFrameBound(self):

        localctx = HogQLParser.WinFrameBoundContext(self, self._ctx, self.state)
        self.enterRule(localctx, 114, self.RULE_winFrameBound)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 734
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,91,self._ctx)
            if la_ == 1:
                self.state = 722
                self.match(HogQLParser.CURRENT)
                self.state = 723
                self.match(HogQLParser.ROW)
                pass

            elif la_ == 2:
                self.state = 724
                self.match(HogQLParser.UNBOUNDED)
                self.state = 725
                self.match(HogQLParser.PRECEDING)
                pass

            elif la_ == 3:
                self.state = 726
                self.match(HogQLParser.UNBOUNDED)
                self.state = 727
                self.match(HogQLParser.FOLLOWING)
                pass

            elif la_ == 4:
                self.state = 728
                self.numberLiteral()
                self.state = 729
                self.match(HogQLParser.PRECEDING)
                pass

            elif la_ == 5:
                self.state = 731
                self.numberLiteral()
                self.state = 732
                self.match(HogQLParser.FOLLOWING)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def EOF(self):
            return self.getToken(HogQLParser.EOF, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_expr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitExpr" ):
                return visitor.visitExpr(self)
            else:
                return visitor.visitChildren(self)




    def expr(self):

        localctx = HogQLParser.ExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 116, self.RULE_expr)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 736
            self.columnExpr(0)
            self.state = 737
            self.match(HogQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ColumnTypeExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_columnTypeExpr

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class ColumnTypeExprNestedContext(ColumnTypeExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnTypeExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnTypeExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnTypeExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnTypeExprContext,i)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnTypeExprNested" ):
                return visitor.visitColumnTypeExprNested(self)
            else:
                return visitor.visitChildren(self)


    class ColumnTypeExprParamContext(ColumnTypeExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnTypeExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnTypeExprParam" ):
                return visitor.visitColumnTypeExprParam(self)
            else:
                return visitor.visitChildren(self)


    class ColumnTypeExprSimpleContext(ColumnTypeExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnTypeExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnTypeExprSimple" ):
                return visitor.visitColumnTypeExprSimple(self)
            else:
                return visitor.visitChildren(self)


    class ColumnTypeExprComplexContext(ColumnTypeExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnTypeExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnTypeExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnTypeExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnTypeExprContext,i)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnTypeExprComplex" ):
                return visitor.visitColumnTypeExprComplex(self)
            else:
                return visitor.visitChildren(self)


    class ColumnTypeExprEnumContext(ColumnTypeExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnTypeExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def enumValue(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.EnumValueContext)
            else:
                return self.getTypedRuleContext(HogQLParser.EnumValueContext,i)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnTypeExprEnum" ):
                return visitor.visitColumnTypeExprEnum(self)
            else:
                return visitor.visitChildren(self)



    def columnTypeExpr(self):

        localctx = HogQLParser.ColumnTypeExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 118, self.RULE_columnTypeExpr)
        self._la = 0 # Token type
        try:
            self.state = 795
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,99,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.ColumnTypeExprSimpleContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 739
                self.identifier()
                pass

            elif la_ == 2:
                localctx = HogQLParser.ColumnTypeExprNestedContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 740
                self.identifier()
                self.state = 741
                self.match(HogQLParser.LPAREN)
                self.state = 742
                self.identifier()
                self.state = 743
                self.columnTypeExpr()
                self.state = 750
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,92,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 744
                        self.match(HogQLParser.COMMA)
                        self.state = 745
                        self.identifier()
                        self.state = 746
                        self.columnTypeExpr() 
                    self.state = 752
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,92,self._ctx)

                self.state = 754
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==119:
                    self.state = 753
                    self.match(HogQLParser.COMMA)


                self.state = 756
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 3:
                localctx = HogQLParser.ColumnTypeExprEnumContext(self, localctx)
                self.enterOuterAlt(localctx, 3)
                self.state = 758
                self.identifier()
                self.state = 759
                self.match(HogQLParser.LPAREN)
                self.state = 760
                self.enumValue()
                self.state = 765
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,94,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 761
                        self.match(HogQLParser.COMMA)
                        self.state = 762
                        self.enumValue() 
                    self.state = 767
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,94,self._ctx)

                self.state = 769
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==119:
                    self.state = 768
                    self.match(HogQLParser.COMMA)


                self.state = 771
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 4:
                localctx = HogQLParser.ColumnTypeExprComplexContext(self, localctx)
                self.enterOuterAlt(localctx, 4)
                self.state = 773
                self.identifier()
                self.state = 774
                self.match(HogQLParser.LPAREN)
                self.state = 775
                self.columnTypeExpr()
                self.state = 780
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,96,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 776
                        self.match(HogQLParser.COMMA)
                        self.state = 777
                        self.columnTypeExpr() 
                    self.state = 782
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,96,self._ctx)

                self.state = 784
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==119:
                    self.state = 783
                    self.match(HogQLParser.COMMA)


                self.state = 786
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 5:
                localctx = HogQLParser.ColumnTypeExprParamContext(self, localctx)
                self.enterOuterAlt(localctx, 5)
                self.state = 788
                self.identifier()
                self.state = 789
                self.match(HogQLParser.LPAREN)
                self.state = 791
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                    self.state = 790
                    self.columnExprList()


                self.state = 793
                self.match(HogQLParser.RPAREN)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ColumnExprListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_columnExprList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprList" ):
                return visitor.visitColumnExprList(self)
            else:
                return visitor.visitChildren(self)




    def columnExprList(self):

        localctx = HogQLParser.ColumnExprListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 120, self.RULE_columnExprList)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 797
            self.columnExpr(0)
            self.state = 802
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,100,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 798
                    self.match(HogQLParser.COMMA)
                    self.state = 799
                    self.columnExpr(0) 
                self.state = 804
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,100,self._ctx)

            self.state = 806
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,101,self._ctx)
            if la_ == 1:
                self.state = 805
                self.match(HogQLParser.COMMA)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ColumnExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_columnExpr

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)


    class ColumnExprTernaryOpContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def QUERY(self):
            return self.getToken(HogQLParser.QUERY, 0)
        def COLON(self):
            return self.getToken(HogQLParser.COLON, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTernaryOp" ):
                return visitor.visitColumnExprTernaryOp(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprAliasContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprAlias" ):
                return visitor.visitColumnExprAlias(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNegateContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def DASH(self):
            return self.getToken(HogQLParser.DASH, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNegate" ):
                return visitor.visitColumnExprNegate(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprDictContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LBRACE(self):
            return self.getToken(HogQLParser.LBRACE, 0)
        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)
        def kvPairList(self):
            return self.getTypedRuleContext(HogQLParser.KvPairListContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprDict" ):
                return visitor.visitColumnExprDict(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprSubqueryContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def selectSetStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectSetStmtContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprSubquery" ):
                return visitor.visitColumnExprSubquery(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprLiteralContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def literal(self):
            return self.getTypedRuleContext(HogQLParser.LiteralContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprLiteral" ):
                return visitor.visitColumnExprLiteral(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprArrayContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LBRACKET(self):
            return self.getToken(HogQLParser.LBRACKET, 0)
        def RBRACKET(self):
            return self.getToken(HogQLParser.RBRACKET, 0)
        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprArray" ):
                return visitor.visitColumnExprArray(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprSubstringContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def SUBSTRING(self):
            return self.getToken(HogQLParser.SUBSTRING, 0)
        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def FROM(self):
            return self.getToken(HogQLParser.FROM, 0)
        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def FOR(self):
            return self.getToken(HogQLParser.FOR, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprSubstring" ):
                return visitor.visitColumnExprSubstring(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprCastContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def CAST(self):
            return self.getToken(HogQLParser.CAST, 0)
        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)
        def columnTypeExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnTypeExprContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprCast" ):
                return visitor.visitColumnExprCast(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprOrContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def OR(self):
            return self.getToken(HogQLParser.OR, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprOr" ):
                return visitor.visitColumnExprOr(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNullTupleAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def NULL_PROPERTY(self):
            return self.getToken(HogQLParser.NULL_PROPERTY, 0)
        def DECIMAL_LITERAL(self):
            return self.getToken(HogQLParser.DECIMAL_LITERAL, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNullTupleAccess" ):
                return visitor.visitColumnExprNullTupleAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprPrecedence1Context(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.left = None # ColumnExprContext
            self.operator = None # Token
            self.right = None # ColumnExprContext
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def ASTERISK(self):
            return self.getToken(HogQLParser.ASTERISK, 0)
        def SLASH(self):
            return self.getToken(HogQLParser.SLASH, 0)
        def PERCENT(self):
            return self.getToken(HogQLParser.PERCENT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprPrecedence1" ):
                return visitor.visitColumnExprPrecedence1(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprPrecedence2Context(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.left = None # ColumnExprContext
            self.operator = None # Token
            self.right = None # ColumnExprContext
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def PLUS(self):
            return self.getToken(HogQLParser.PLUS, 0)
        def DASH(self):
            return self.getToken(HogQLParser.DASH, 0)
        def CONCAT(self):
            return self.getToken(HogQLParser.CONCAT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprPrecedence2" ):
                return visitor.visitColumnExprPrecedence2(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprPrecedence3Context(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.left = None # ColumnExprContext
            self.operator = None # Token
            self.right = None # ColumnExprContext
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def IN(self):
            return self.getToken(HogQLParser.IN, 0)
        def EQ_DOUBLE(self):
            return self.getToken(HogQLParser.EQ_DOUBLE, 0)
        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)
        def NOT_EQ(self):
            return self.getToken(HogQLParser.NOT_EQ, 0)
        def LT_EQ(self):
            return self.getToken(HogQLParser.LT_EQ, 0)
        def LT(self):
            return self.getToken(HogQLParser.LT, 0)
        def GT_EQ(self):
            return self.getToken(HogQLParser.GT_EQ, 0)
        def GT(self):
            return self.getToken(HogQLParser.GT, 0)
        def LIKE(self):
            return self.getToken(HogQLParser.LIKE, 0)
        def ILIKE(self):
            return self.getToken(HogQLParser.ILIKE, 0)
        def REGEX_SINGLE(self):
            return self.getToken(HogQLParser.REGEX_SINGLE, 0)
        def REGEX_DOUBLE(self):
            return self.getToken(HogQLParser.REGEX_DOUBLE, 0)
        def NOT_REGEX(self):
            return self.getToken(HogQLParser.NOT_REGEX, 0)
        def IREGEX_SINGLE(self):
            return self.getToken(HogQLParser.IREGEX_SINGLE, 0)
        def IREGEX_DOUBLE(self):
            return self.getToken(HogQLParser.IREGEX_DOUBLE, 0)
        def NOT_IREGEX(self):
            return self.getToken(HogQLParser.NOT_IREGEX, 0)
        def COHORT(self):
            return self.getToken(HogQLParser.COHORT, 0)
        def NOT(self):
            return self.getToken(HogQLParser.NOT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprPrecedence3" ):
                return visitor.visitColumnExprPrecedence3(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprIntervalContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def INTERVAL(self):
            return self.getToken(HogQLParser.INTERVAL, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def interval(self):
            return self.getTypedRuleContext(HogQLParser.IntervalContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprInterval" ):
                return visitor.visitColumnExprInterval(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprCallSelectContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def selectSetStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectSetStmtContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprCallSelect" ):
                return visitor.visitColumnExprCallSelect(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprIsNullContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def IS(self):
            return self.getToken(HogQLParser.IS, 0)
        def NULL_SQL(self):
            return self.getToken(HogQLParser.NULL_SQL, 0)
        def NOT(self):
            return self.getToken(HogQLParser.NOT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprIsNull" ):
                return visitor.visitColumnExprIsNull(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprWinFunctionTargetContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.columnExprs = None # ColumnExprListContext
            self.columnArgList = None # ColumnExprListContext
            self.copyFrom(ctx)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)

        def OVER(self):
            return self.getToken(HogQLParser.OVER, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.LPAREN)
            else:
                return self.getToken(HogQLParser.LPAREN, i)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.RPAREN)
            else:
                return self.getToken(HogQLParser.RPAREN, i)
        def columnExprList(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprListContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,i)

        def DISTINCT(self):
            return self.getToken(HogQLParser.DISTINCT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprWinFunctionTarget" ):
                return visitor.visitColumnExprWinFunctionTarget(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNullPropertyAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def NULL_PROPERTY(self):
            return self.getToken(HogQLParser.NULL_PROPERTY, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNullPropertyAccess" ):
                return visitor.visitColumnExprNullPropertyAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprIntervalStringContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def INTERVAL(self):
            return self.getToken(HogQLParser.INTERVAL, 0)
        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprIntervalString" ):
                return visitor.visitColumnExprIntervalString(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTrimContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def TRIM(self):
            return self.getToken(HogQLParser.TRIM, 0)
        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def string(self):
            return self.getTypedRuleContext(HogQLParser.StringContext,0)

        def FROM(self):
            return self.getToken(HogQLParser.FROM, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def BOTH(self):
            return self.getToken(HogQLParser.BOTH, 0)
        def LEADING(self):
            return self.getToken(HogQLParser.LEADING, 0)
        def TRAILING(self):
            return self.getToken(HogQLParser.TRAILING, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTrim" ):
                return visitor.visitColumnExprTrim(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTagElementContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def hogqlxTagElement(self):
            return self.getTypedRuleContext(HogQLParser.HogqlxTagElementContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTagElement" ):
                return visitor.visitColumnExprTagElement(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTemplateStringContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def templateString(self):
            return self.getTypedRuleContext(HogQLParser.TemplateStringContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTemplateString" ):
                return visitor.visitColumnExprTemplateString(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTupleContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTuple" ):
                return visitor.visitColumnExprTuple(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprCallContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)
        def columnExprList(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprCall" ):
                return visitor.visitColumnExprCall(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprArrayAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def LBRACKET(self):
            return self.getToken(HogQLParser.LBRACKET, 0)
        def RBRACKET(self):
            return self.getToken(HogQLParser.RBRACKET, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprArrayAccess" ):
                return visitor.visitColumnExprArrayAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprBetweenContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def BETWEEN(self):
            return self.getToken(HogQLParser.BETWEEN, 0)
        def AND(self):
            return self.getToken(HogQLParser.AND, 0)
        def NOT(self):
            return self.getToken(HogQLParser.NOT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprBetween" ):
                return visitor.visitColumnExprBetween(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprPropertyAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprPropertyAccess" ):
                return visitor.visitColumnExprPropertyAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprParensContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprParens" ):
                return visitor.visitColumnExprParens(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNullArrayAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def NULL_PROPERTY(self):
            return self.getToken(HogQLParser.NULL_PROPERTY, 0)
        def LBRACKET(self):
            return self.getToken(HogQLParser.LBRACKET, 0)
        def RBRACKET(self):
            return self.getToken(HogQLParser.RBRACKET, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNullArrayAccess" ):
                return visitor.visitColumnExprNullArrayAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTimestampContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def TIMESTAMP(self):
            return self.getToken(HogQLParser.TIMESTAMP, 0)
        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTimestamp" ):
                return visitor.visitColumnExprTimestamp(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNullishContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def NULLISH(self):
            return self.getToken(HogQLParser.NULLISH, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNullish" ):
                return visitor.visitColumnExprNullish(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprAndContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)

        def AND(self):
            return self.getToken(HogQLParser.AND, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprAnd" ):
                return visitor.visitColumnExprAnd(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprTupleAccessContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)
        def DECIMAL_LITERAL(self):
            return self.getToken(HogQLParser.DECIMAL_LITERAL, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprTupleAccess" ):
                return visitor.visitColumnExprTupleAccess(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprCaseContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.caseExpr = None # ColumnExprContext
            self.whenExpr = None # ColumnExprContext
            self.thenExpr = None # ColumnExprContext
            self.elseExpr = None # ColumnExprContext
            self.copyFrom(ctx)

        def CASE(self):
            return self.getToken(HogQLParser.CASE, 0)
        def END(self):
            return self.getToken(HogQLParser.END, 0)
        def WHEN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.WHEN)
            else:
                return self.getToken(HogQLParser.WHEN, i)
        def THEN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.THEN)
            else:
                return self.getToken(HogQLParser.THEN, i)
        def ELSE(self):
            return self.getToken(HogQLParser.ELSE, 0)
        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprCase" ):
                return visitor.visitColumnExprCase(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprDateContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def DATE(self):
            return self.getToken(HogQLParser.DATE, 0)
        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprDate" ):
                return visitor.visitColumnExprDate(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprNotContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def NOT(self):
            return self.getToken(HogQLParser.NOT, 0)
        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprNot" ):
                return visitor.visitColumnExprNot(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprWinFunctionContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.columnExprs = None # ColumnExprListContext
            self.columnArgList = None # ColumnExprListContext
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def OVER(self):
            return self.getToken(HogQLParser.OVER, 0)
        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.LPAREN)
            else:
                return self.getToken(HogQLParser.LPAREN, i)
        def windowExpr(self):
            return self.getTypedRuleContext(HogQLParser.WindowExprContext,0)

        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.RPAREN)
            else:
                return self.getToken(HogQLParser.RPAREN, i)
        def columnExprList(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprListContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,i)

        def DISTINCT(self):
            return self.getToken(HogQLParser.DISTINCT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprWinFunction" ):
                return visitor.visitColumnExprWinFunction(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprLambdaContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnLambdaExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnLambdaExprContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprLambda" ):
                return visitor.visitColumnExprLambda(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprIdentifierContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.ColumnIdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprIdentifier" ):
                return visitor.visitColumnExprIdentifier(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprFunctionContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.columnExprs = None # ColumnExprListContext
            self.columnArgList = None # ColumnExprListContext
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def LPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.LPAREN)
            else:
                return self.getToken(HogQLParser.LPAREN, i)
        def RPAREN(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.RPAREN)
            else:
                return self.getToken(HogQLParser.RPAREN, i)
        def DISTINCT(self):
            return self.getToken(HogQLParser.DISTINCT, 0)
        def columnExprList(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprListContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprListContext,i)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprFunction" ):
                return visitor.visitColumnExprFunction(self)
            else:
                return visitor.visitChildren(self)


    class ColumnExprAsteriskContext(ColumnExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.ColumnExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def ASTERISK(self):
            return self.getToken(HogQLParser.ASTERISK, 0)
        def tableIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.TableIdentifierContext,0)

        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnExprAsterisk" ):
                return visitor.visitColumnExprAsterisk(self)
            else:
                return visitor.visitChildren(self)



    def columnExpr(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = HogQLParser.ColumnExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 122
        self.enterRecursionRule(localctx, 122, self.RULE_columnExpr, _p)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 960
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,121,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.ColumnExprCaseContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 809
                self.match(HogQLParser.CASE)
                self.state = 811
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,102,self._ctx)
                if la_ == 1:
                    self.state = 810
                    localctx.caseExpr = self.columnExpr(0)


                self.state = 818 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 813
                    self.match(HogQLParser.WHEN)
                    self.state = 814
                    localctx.whenExpr = self.columnExpr(0)
                    self.state = 815
                    self.match(HogQLParser.THEN)
                    self.state = 816
                    localctx.thenExpr = self.columnExpr(0)
                    self.state = 820 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==101):
                        break

                self.state = 824
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==25:
                    self.state = 822
                    self.match(HogQLParser.ELSE)
                    self.state = 823
                    localctx.elseExpr = self.columnExpr(0)


                self.state = 826
                self.match(HogQLParser.END)
                pass

            elif la_ == 2:
                localctx = HogQLParser.ColumnExprCastContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 828
                self.match(HogQLParser.CAST)
                self.state = 829
                self.match(HogQLParser.LPAREN)
                self.state = 830
                self.columnExpr(0)
                self.state = 831
                self.match(HogQLParser.AS)
                self.state = 832
                self.columnTypeExpr()
                self.state = 833
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 3:
                localctx = HogQLParser.ColumnExprDateContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 835
                self.match(HogQLParser.DATE)
                self.state = 836
                self.match(HogQLParser.STRING_LITERAL)
                pass

            elif la_ == 4:
                localctx = HogQLParser.ColumnExprIntervalStringContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 837
                self.match(HogQLParser.INTERVAL)
                self.state = 838
                self.match(HogQLParser.STRING_LITERAL)
                pass

            elif la_ == 5:
                localctx = HogQLParser.ColumnExprIntervalContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 839
                self.match(HogQLParser.INTERVAL)
                self.state = 840
                self.columnExpr(0)
                self.state = 841
                self.interval()
                pass

            elif la_ == 6:
                localctx = HogQLParser.ColumnExprSubstringContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 843
                self.match(HogQLParser.SUBSTRING)
                self.state = 844
                self.match(HogQLParser.LPAREN)
                self.state = 845
                self.columnExpr(0)
                self.state = 846
                self.match(HogQLParser.FROM)
                self.state = 847
                self.columnExpr(0)
                self.state = 850
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==34:
                    self.state = 848
                    self.match(HogQLParser.FOR)
                    self.state = 849
                    self.columnExpr(0)


                self.state = 852
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 7:
                localctx = HogQLParser.ColumnExprTimestampContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 854
                self.match(HogQLParser.TIMESTAMP)
                self.state = 855
                self.match(HogQLParser.STRING_LITERAL)
                pass

            elif la_ == 8:
                localctx = HogQLParser.ColumnExprTrimContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 856
                self.match(HogQLParser.TRIM)
                self.state = 857
                self.match(HogQLParser.LPAREN)
                self.state = 858
                _la = self._input.LA(1)
                if not(_la==10 or _la==53 or _la==93):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 859
                self.string()
                self.state = 860
                self.match(HogQLParser.FROM)
                self.state = 861
                self.columnExpr(0)
                self.state = 862
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 9:
                localctx = HogQLParser.ColumnExprWinFunctionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 864
                self.identifier()

                self.state = 865
                self.match(HogQLParser.LPAREN)
                self.state = 867
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                    self.state = 866
                    localctx.columnExprs = self.columnExprList()


                self.state = 869
                self.match(HogQLParser.RPAREN)
                self.state = 879
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==133:
                    self.state = 871
                    self.match(HogQLParser.LPAREN)
                    self.state = 873
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,107,self._ctx)
                    if la_ == 1:
                        self.state = 872
                        self.match(HogQLParser.DISTINCT)


                    self.state = 876
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                        self.state = 875
                        localctx.columnArgList = self.columnExprList()


                    self.state = 878
                    self.match(HogQLParser.RPAREN)


                self.state = 881
                self.match(HogQLParser.OVER)
                self.state = 882
                self.match(HogQLParser.LPAREN)
                self.state = 883
                self.windowExpr()
                self.state = 884
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 10:
                localctx = HogQLParser.ColumnExprWinFunctionTargetContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 886
                self.identifier()

                self.state = 887
                self.match(HogQLParser.LPAREN)
                self.state = 889
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                    self.state = 888
                    localctx.columnExprs = self.columnExprList()


                self.state = 891
                self.match(HogQLParser.RPAREN)
                self.state = 901
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==133:
                    self.state = 893
                    self.match(HogQLParser.LPAREN)
                    self.state = 895
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,111,self._ctx)
                    if la_ == 1:
                        self.state = 894
                        self.match(HogQLParser.DISTINCT)


                    self.state = 898
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                        self.state = 897
                        localctx.columnArgList = self.columnExprList()


                    self.state = 900
                    self.match(HogQLParser.RPAREN)


                self.state = 903
                self.match(HogQLParser.OVER)
                self.state = 904
                self.identifier()
                pass

            elif la_ == 11:
                localctx = HogQLParser.ColumnExprFunctionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 906
                self.identifier()
                self.state = 912
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,115,self._ctx)
                if la_ == 1:
                    self.state = 907
                    self.match(HogQLParser.LPAREN)
                    self.state = 909
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                        self.state = 908
                        localctx.columnExprs = self.columnExprList()


                    self.state = 911
                    self.match(HogQLParser.RPAREN)


                self.state = 914
                self.match(HogQLParser.LPAREN)
                self.state = 916
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,116,self._ctx)
                if la_ == 1:
                    self.state = 915
                    self.match(HogQLParser.DISTINCT)


                self.state = 919
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                    self.state = 918
                    localctx.columnArgList = self.columnExprList()


                self.state = 921
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 12:
                localctx = HogQLParser.ColumnExprTagElementContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 923
                self.hogqlxTagElement()
                pass

            elif la_ == 13:
                localctx = HogQLParser.ColumnExprTemplateStringContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 924
                self.templateString()
                pass

            elif la_ == 14:
                localctx = HogQLParser.ColumnExprLiteralContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 925
                self.literal()
                pass

            elif la_ == 15:
                localctx = HogQLParser.ColumnExprNegateContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 926
                self.match(HogQLParser.DASH)
                self.state = 927
                self.columnExpr(20)
                pass

            elif la_ == 16:
                localctx = HogQLParser.ColumnExprNotContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 928
                self.match(HogQLParser.NOT)
                self.state = 929
                self.columnExpr(14)
                pass

            elif la_ == 17:
                localctx = HogQLParser.ColumnExprAsteriskContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 933
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -5800812384855539714) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 25834219896831) != 0):
                    self.state = 930
                    self.tableIdentifier()
                    self.state = 931
                    self.match(HogQLParser.DOT)


                self.state = 935
                self.match(HogQLParser.ASTERISK)
                pass

            elif la_ == 18:
                localctx = HogQLParser.ColumnExprSubqueryContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 936
                self.match(HogQLParser.LPAREN)
                self.state = 937
                self.selectSetStmt()
                self.state = 938
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 19:
                localctx = HogQLParser.ColumnExprParensContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 940
                self.match(HogQLParser.LPAREN)
                self.state = 941
                self.columnExpr(0)
                self.state = 942
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 20:
                localctx = HogQLParser.ColumnExprTupleContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 944
                self.match(HogQLParser.LPAREN)
                self.state = 945
                self.columnExprList()
                self.state = 946
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 21:
                localctx = HogQLParser.ColumnExprArrayContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 948
                self.match(HogQLParser.LBRACKET)
                self.state = 950
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                    self.state = 949
                    self.columnExprList()


                self.state = 952
                self.match(HogQLParser.RBRACKET)
                pass

            elif la_ == 22:
                localctx = HogQLParser.ColumnExprDictContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 953
                self.match(HogQLParser.LBRACE)
                self.state = 955
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                    self.state = 954
                    self.kvPairList()


                self.state = 957
                self.match(HogQLParser.RBRACE)
                pass

            elif la_ == 23:
                localctx = HogQLParser.ColumnExprLambdaContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 958
                self.columnLambdaExpr()
                pass

            elif la_ == 24:
                localctx = HogQLParser.ColumnExprIdentifierContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 959
                self.columnIdentifier()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 1077
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,133,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    self.state = 1075
                    self._errHandler.sync(self)
                    la_ = self._interp.adaptivePredict(self._input,132,self._ctx)
                    if la_ == 1:
                        localctx = HogQLParser.ColumnExprPrecedence1Context(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 962
                        if not self.precpred(self._ctx, 19):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 19)")
                        self.state = 966
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [115]:
                            self.state = 963
                            localctx.operator = self.match(HogQLParser.ASTERISK)
                            pass
                        elif token in [155]:
                            self.state = 964
                            localctx.operator = self.match(HogQLParser.SLASH)
                            pass
                        elif token in [142]:
                            self.state = 965
                            localctx.operator = self.match(HogQLParser.PERCENT)
                            pass
                        else:
                            raise NoViableAltException(self)

                        self.state = 968
                        localctx.right = self.columnExpr(20)
                        pass

                    elif la_ == 2:
                        localctx = HogQLParser.ColumnExprPrecedence2Context(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 969
                        if not self.precpred(self._ctx, 18):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 18)")
                        self.state = 973
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [143]:
                            self.state = 970
                            localctx.operator = self.match(HogQLParser.PLUS)
                            pass
                        elif token in [121]:
                            self.state = 971
                            localctx.operator = self.match(HogQLParser.DASH)
                            pass
                        elif token in [120]:
                            self.state = 972
                            localctx.operator = self.match(HogQLParser.CONCAT)
                            pass
                        else:
                            raise NoViableAltException(self)

                        self.state = 975
                        localctx.right = self.columnExpr(19)
                        pass

                    elif la_ == 3:
                        localctx = HogQLParser.ColumnExprPrecedence3Context(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        localctx.left = _prevctx
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 976
                        if not self.precpred(self._ctx, 17):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 17)")
                        self.state = 1001
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,127,self._ctx)
                        if la_ == 1:
                            self.state = 977
                            localctx.operator = self.match(HogQLParser.EQ_DOUBLE)
                            pass

                        elif la_ == 2:
                            self.state = 978
                            localctx.operator = self.match(HogQLParser.EQ_SINGLE)
                            pass

                        elif la_ == 3:
                            self.state = 979
                            localctx.operator = self.match(HogQLParser.NOT_EQ)
                            pass

                        elif la_ == 4:
                            self.state = 980
                            localctx.operator = self.match(HogQLParser.LT_EQ)
                            pass

                        elif la_ == 5:
                            self.state = 981
                            localctx.operator = self.match(HogQLParser.LT)
                            pass

                        elif la_ == 6:
                            self.state = 982
                            localctx.operator = self.match(HogQLParser.GT_EQ)
                            pass

                        elif la_ == 7:
                            self.state = 983
                            localctx.operator = self.match(HogQLParser.GT)
                            pass

                        elif la_ == 8:
                            self.state = 985
                            self._errHandler.sync(self)
                            _la = self._input.LA(1)
                            if _la==61:
                                self.state = 984
                                localctx.operator = self.match(HogQLParser.NOT)


                            self.state = 987
                            self.match(HogQLParser.IN)
                            self.state = 989
                            self._errHandler.sync(self)
                            la_ = self._interp.adaptivePredict(self._input,125,self._ctx)
                            if la_ == 1:
                                self.state = 988
                                self.match(HogQLParser.COHORT)


                            pass

                        elif la_ == 9:
                            self.state = 992
                            self._errHandler.sync(self)
                            _la = self._input.LA(1)
                            if _la==61:
                                self.state = 991
                                localctx.operator = self.match(HogQLParser.NOT)


                            self.state = 994
                            _la = self._input.LA(1)
                            if not(_la==43 or _la==56):
                                self._errHandler.recoverInline(self)
                            else:
                                self._errHandler.reportMatch(self)
                                self.consume()
                            pass

                        elif la_ == 10:
                            self.state = 995
                            localctx.operator = self.match(HogQLParser.REGEX_SINGLE)
                            pass

                        elif la_ == 11:
                            self.state = 996
                            localctx.operator = self.match(HogQLParser.REGEX_DOUBLE)
                            pass

                        elif la_ == 12:
                            self.state = 997
                            localctx.operator = self.match(HogQLParser.NOT_REGEX)
                            pass

                        elif la_ == 13:
                            self.state = 998
                            localctx.operator = self.match(HogQLParser.IREGEX_SINGLE)
                            pass

                        elif la_ == 14:
                            self.state = 999
                            localctx.operator = self.match(HogQLParser.IREGEX_DOUBLE)
                            pass

                        elif la_ == 15:
                            self.state = 1000
                            localctx.operator = self.match(HogQLParser.NOT_IREGEX)
                            pass


                        self.state = 1003
                        localctx.right = self.columnExpr(18)
                        pass

                    elif la_ == 4:
                        localctx = HogQLParser.ColumnExprNullishContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1004
                        if not self.precpred(self._ctx, 15):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 15)")
                        self.state = 1005
                        self.match(HogQLParser.NULLISH)
                        self.state = 1006
                        self.columnExpr(16)
                        pass

                    elif la_ == 5:
                        localctx = HogQLParser.ColumnExprAndContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1007
                        if not self.precpred(self._ctx, 13):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 13)")
                        self.state = 1008
                        self.match(HogQLParser.AND)
                        self.state = 1009
                        self.columnExpr(14)
                        pass

                    elif la_ == 6:
                        localctx = HogQLParser.ColumnExprOrContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1010
                        if not self.precpred(self._ctx, 12):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 12)")
                        self.state = 1011
                        self.match(HogQLParser.OR)
                        self.state = 1012
                        self.columnExpr(13)
                        pass

                    elif la_ == 7:
                        localctx = HogQLParser.ColumnExprBetweenContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1013
                        if not self.precpred(self._ctx, 11):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 11)")
                        self.state = 1015
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==61:
                            self.state = 1014
                            self.match(HogQLParser.NOT)


                        self.state = 1017
                        self.match(HogQLParser.BETWEEN)
                        self.state = 1018
                        self.columnExpr(0)
                        self.state = 1019
                        self.match(HogQLParser.AND)
                        self.state = 1020
                        self.columnExpr(12)
                        pass

                    elif la_ == 8:
                        localctx = HogQLParser.ColumnExprTernaryOpContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1022
                        if not self.precpred(self._ctx, 10):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 10)")
                        self.state = 1023
                        self.match(HogQLParser.QUERY)
                        self.state = 1024
                        self.columnExpr(0)
                        self.state = 1025
                        self.match(HogQLParser.COLON)
                        self.state = 1026
                        self.columnExpr(10)
                        pass

                    elif la_ == 9:
                        localctx = HogQLParser.ColumnExprCallSelectContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1028
                        if not self.precpred(self._ctx, 31):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 31)")
                        self.state = 1029
                        self.match(HogQLParser.LPAREN)
                        self.state = 1030
                        self.selectSetStmt()
                        self.state = 1031
                        self.match(HogQLParser.RPAREN)
                        pass

                    elif la_ == 10:
                        localctx = HogQLParser.ColumnExprCallContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1033
                        if not self.precpred(self._ctx, 30):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 30)")
                        self.state = 1034
                        self.match(HogQLParser.LPAREN)
                        self.state = 1036
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                            self.state = 1035
                            self.columnExprList()


                        self.state = 1038
                        self.match(HogQLParser.RPAREN)
                        pass

                    elif la_ == 11:
                        localctx = HogQLParser.ColumnExprArrayAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1039
                        if not self.precpred(self._ctx, 26):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 26)")
                        self.state = 1040
                        self.match(HogQLParser.LBRACKET)
                        self.state = 1041
                        self.columnExpr(0)
                        self.state = 1042
                        self.match(HogQLParser.RBRACKET)
                        pass

                    elif la_ == 12:
                        localctx = HogQLParser.ColumnExprTupleAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1044
                        if not self.precpred(self._ctx, 25):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 25)")
                        self.state = 1045
                        self.match(HogQLParser.DOT)
                        self.state = 1046
                        self.match(HogQLParser.DECIMAL_LITERAL)
                        pass

                    elif la_ == 13:
                        localctx = HogQLParser.ColumnExprPropertyAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1047
                        if not self.precpred(self._ctx, 24):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 24)")
                        self.state = 1048
                        self.match(HogQLParser.DOT)
                        self.state = 1049
                        self.identifier()
                        pass

                    elif la_ == 14:
                        localctx = HogQLParser.ColumnExprNullArrayAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1050
                        if not self.precpred(self._ctx, 23):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 23)")
                        self.state = 1051
                        self.match(HogQLParser.NULL_PROPERTY)
                        self.state = 1052
                        self.match(HogQLParser.LBRACKET)
                        self.state = 1053
                        self.columnExpr(0)
                        self.state = 1054
                        self.match(HogQLParser.RBRACKET)
                        pass

                    elif la_ == 15:
                        localctx = HogQLParser.ColumnExprNullTupleAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1056
                        if not self.precpred(self._ctx, 22):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 22)")
                        self.state = 1057
                        self.match(HogQLParser.NULL_PROPERTY)
                        self.state = 1058
                        self.match(HogQLParser.DECIMAL_LITERAL)
                        pass

                    elif la_ == 16:
                        localctx = HogQLParser.ColumnExprNullPropertyAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1059
                        if not self.precpred(self._ctx, 21):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 21)")
                        self.state = 1060
                        self.match(HogQLParser.NULL_PROPERTY)
                        self.state = 1061
                        self.identifier()
                        pass

                    elif la_ == 17:
                        localctx = HogQLParser.ColumnExprIsNullContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1062
                        if not self.precpred(self._ctx, 16):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 16)")
                        self.state = 1063
                        self.match(HogQLParser.IS)
                        self.state = 1065
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if _la==61:
                            self.state = 1064
                            self.match(HogQLParser.NOT)


                        self.state = 1067
                        self.match(HogQLParser.NULL_SQL)
                        pass

                    elif la_ == 18:
                        localctx = HogQLParser.ColumnExprAliasContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState))
                        self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr)
                        self.state = 1068
                        if not self.precpred(self._ctx, 9):
                            from antlr4.error.Errors import FailedPredicateException
                            raise FailedPredicateException(self, "self.precpred(self._ctx, 9)")
                        self.state = 1073
                        self._errHandler.sync(self)
                        la_ = self._interp.adaptivePredict(self._input,131,self._ctx)
                        if la_ == 1:
                            self.state = 1069
                            self.match(HogQLParser.AS)
                            self.state = 1070
                            self.identifier()
                            pass

                        elif la_ == 2:
                            self.state = 1071
                            self.match(HogQLParser.AS)
                            self.state = 1072
                            self.match(HogQLParser.STRING_LITERAL)
                            pass


                        pass

             
                self.state = 1079
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,133,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx


    class ColumnLambdaExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ARROW(self):
            return self.getToken(HogQLParser.ARROW, 0)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def block(self):
            return self.getTypedRuleContext(HogQLParser.BlockContext,0)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_columnLambdaExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnLambdaExpr" ):
                return visitor.visitColumnLambdaExpr(self)
            else:
                return visitor.visitChildren(self)




    def columnLambdaExpr(self):

        localctx = HogQLParser.ColumnLambdaExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 124, self.RULE_columnLambdaExpr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1107
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,138,self._ctx)
            if la_ == 1:
                self.state = 1080
                self.match(HogQLParser.LPAREN)
                self.state = 1081
                self.identifier()
                self.state = 1086
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,134,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 1082
                        self.match(HogQLParser.COMMA)
                        self.state = 1083
                        self.identifier() 
                    self.state = 1088
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,134,self._ctx)

                self.state = 1090
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==119:
                    self.state = 1089
                    self.match(HogQLParser.COMMA)


                self.state = 1092
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 2:
                self.state = 1094
                self.identifier()
                self.state = 1099
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,136,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 1095
                        self.match(HogQLParser.COMMA)
                        self.state = 1096
                        self.identifier() 
                    self.state = 1101
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,136,self._ctx)

                self.state = 1103
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==119:
                    self.state = 1102
                    self.match(HogQLParser.COMMA)


                pass

            elif la_ == 3:
                self.state = 1105
                self.match(HogQLParser.LPAREN)
                self.state = 1106
                self.match(HogQLParser.RPAREN)
                pass


            self.state = 1109
            self.match(HogQLParser.ARROW)
            self.state = 1112
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,139,self._ctx)
            if la_ == 1:
                self.state = 1110
                self.columnExpr(0)
                pass

            elif la_ == 2:
                self.state = 1111
                self.block()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HogqlxChildElementContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def hogqlxTagElement(self):
            return self.getTypedRuleContext(HogQLParser.HogqlxTagElementContext,0)


        def hogqlxText(self):
            return self.getTypedRuleContext(HogQLParser.HogqlxTextContext,0)


        def LBRACE(self):
            return self.getToken(HogQLParser.LBRACE, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_hogqlxChildElement

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHogqlxChildElement" ):
                return visitor.visitHogqlxChildElement(self)
            else:
                return visitor.visitChildren(self)




    def hogqlxChildElement(self):

        localctx = HogQLParser.HogqlxChildElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 126, self.RULE_hogqlxChildElement)
        try:
            self.state = 1120
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [135]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1114
                self.hogqlxTagElement()
                pass
            elif token in [167]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1115
                self.hogqlxText()
                pass
            elif token in [131]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1116
                self.match(HogQLParser.LBRACE)
                self.state = 1117
                self.columnExpr(0)
                self.state = 1118
                self.match(HogQLParser.RBRACE)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HogqlxTextContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def HOGQLX_TEXT_TEXT(self):
            return self.getToken(HogQLParser.HOGQLX_TEXT_TEXT, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_hogqlxText

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHogqlxText" ):
                return visitor.visitHogqlxText(self)
            else:
                return visitor.visitChildren(self)




    def hogqlxText(self):

        localctx = HogQLParser.HogqlxTextContext(self, self._ctx, self.state)
        self.enterRule(localctx, 128, self.RULE_hogqlxText)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1122
            self.match(HogQLParser.HOGQLX_TEXT_TEXT)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HogqlxTagElementContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_hogqlxTagElement

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class HogqlxTagElementClosedContext(HogqlxTagElementContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.HogqlxTagElementContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LT(self):
            return self.getToken(HogQLParser.LT, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def SLASH_GT(self):
            return self.getToken(HogQLParser.SLASH_GT, 0)
        def hogqlxTagAttribute(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.HogqlxTagAttributeContext)
            else:
                return self.getTypedRuleContext(HogQLParser.HogqlxTagAttributeContext,i)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHogqlxTagElementClosed" ):
                return visitor.visitHogqlxTagElementClosed(self)
            else:
                return visitor.visitChildren(self)


    class HogqlxTagElementNestedContext(HogqlxTagElementContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.HogqlxTagElementContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LT(self):
            return self.getToken(HogQLParser.LT, 0)
        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)

        def GT(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.GT)
            else:
                return self.getToken(HogQLParser.GT, i)
        def LT_SLASH(self):
            return self.getToken(HogQLParser.LT_SLASH, 0)
        def hogqlxTagAttribute(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.HogqlxTagAttributeContext)
            else:
                return self.getTypedRuleContext(HogQLParser.HogqlxTagAttributeContext,i)

        def hogqlxChildElement(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.HogqlxChildElementContext)
            else:
                return self.getTypedRuleContext(HogQLParser.HogqlxChildElementContext,i)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHogqlxTagElementNested" ):
                return visitor.visitHogqlxTagElementNested(self)
            else:
                return visitor.visitChildren(self)



    def hogqlxTagElement(self):

        localctx = HogQLParser.HogqlxTagElementContext(self, self._ctx, self.state)
        self.enterRule(localctx, 130, self.RULE_hogqlxTagElement)
        self._la = 0 # Token type
        try:
            self.state = 1153
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,144,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.HogqlxTagElementClosedContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 1124
                self.match(HogQLParser.LT)
                self.state = 1125
                self.identifier()
                self.state = 1129
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & -5800812384855539714) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 25834219896831) != 0):
                    self.state = 1126
                    self.hogqlxTagAttribute()
                    self.state = 1131
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 1132
                self.match(HogQLParser.SLASH_GT)
                pass

            elif la_ == 2:
                localctx = HogQLParser.HogqlxTagElementNestedContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 1134
                self.match(HogQLParser.LT)
                self.state = 1135
                self.identifier()
                self.state = 1139
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while (((_la) & ~0x3f) == 0 and ((1 << _la) & -5800812384855539714) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 25834219896831) != 0):
                    self.state = 1136
                    self.hogqlxTagAttribute()
                    self.state = 1141
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 1142
                self.match(HogQLParser.GT)
                self.state = 1146
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 68719476753) != 0):
                    self.state = 1143
                    self.hogqlxChildElement()
                    self.state = 1148
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                self.state = 1149
                self.match(HogQLParser.LT_SLASH)
                self.state = 1150
                self.identifier()
                self.state = 1151
                self.match(HogQLParser.GT)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class HogqlxTagAttributeContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)

        def string(self):
            return self.getTypedRuleContext(HogQLParser.StringContext,0)


        def LBRACE(self):
            return self.getToken(HogQLParser.LBRACE, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_hogqlxTagAttribute

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitHogqlxTagAttribute" ):
                return visitor.visitHogqlxTagAttribute(self)
            else:
                return visitor.visitChildren(self)




    def hogqlxTagAttribute(self):

        localctx = HogQLParser.HogqlxTagAttributeContext(self, self._ctx, self.state)
        self.enterRule(localctx, 132, self.RULE_hogqlxTagAttribute)
        try:
            self.state = 1166
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,145,self._ctx)
            if la_ == 1:
                self.enterOuterAlt(localctx, 1)
                self.state = 1155
                self.identifier()
                self.state = 1156
                self.match(HogQLParser.EQ_SINGLE)
                self.state = 1157
                self.string()
                pass

            elif la_ == 2:
                self.enterOuterAlt(localctx, 2)
                self.state = 1159
                self.identifier()
                self.state = 1160
                self.match(HogQLParser.EQ_SINGLE)
                self.state = 1161
                self.match(HogQLParser.LBRACE)
                self.state = 1162
                self.columnExpr(0)
                self.state = 1163
                self.match(HogQLParser.RBRACE)
                pass

            elif la_ == 3:
                self.enterOuterAlt(localctx, 3)
                self.state = 1165
                self.identifier()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WithExprListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def withExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.WithExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.WithExprContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_withExprList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWithExprList" ):
                return visitor.visitWithExprList(self)
            else:
                return visitor.visitChildren(self)




    def withExprList(self):

        localctx = HogQLParser.WithExprListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 134, self.RULE_withExprList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1168
            self.withExpr()
            self.state = 1173
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,146,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1169
                    self.match(HogQLParser.COMMA)
                    self.state = 1170
                    self.withExpr() 
                self.state = 1175
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,146,self._ctx)

            self.state = 1177
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==119:
                self.state = 1176
                self.match(HogQLParser.COMMA)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class WithExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_withExpr

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)



    class WithExprColumnContext(WithExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.WithExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWithExprColumn" ):
                return visitor.visitWithExprColumn(self)
            else:
                return visitor.visitChildren(self)


    class WithExprSubqueryContext(WithExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.WithExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)
        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def selectSetStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectSetStmtContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitWithExprSubquery" ):
                return visitor.visitWithExprSubquery(self)
            else:
                return visitor.visitChildren(self)



    def withExpr(self):

        localctx = HogQLParser.WithExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 136, self.RULE_withExpr)
        try:
            self.state = 1189
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,148,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.WithExprSubqueryContext(self, localctx)
                self.enterOuterAlt(localctx, 1)
                self.state = 1179
                self.identifier()
                self.state = 1180
                self.match(HogQLParser.AS)
                self.state = 1181
                self.match(HogQLParser.LPAREN)
                self.state = 1182
                self.selectSetStmt()
                self.state = 1183
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 2:
                localctx = HogQLParser.WithExprColumnContext(self, localctx)
                self.enterOuterAlt(localctx, 2)
                self.state = 1185
                self.columnExpr(0)
                self.state = 1186
                self.match(HogQLParser.AS)
                self.state = 1187
                self.identifier()
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class ColumnIdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def placeholder(self):
            return self.getTypedRuleContext(HogQLParser.PlaceholderContext,0)


        def nestedIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.NestedIdentifierContext,0)


        def tableIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.TableIdentifierContext,0)


        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_columnIdentifier

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitColumnIdentifier" ):
                return visitor.visitColumnIdentifier(self)
            else:
                return visitor.visitChildren(self)




    def columnIdentifier(self):

        localctx = HogQLParser.ColumnIdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 138, self.RULE_columnIdentifier)
        try:
            self.state = 1198
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [131]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1191
                self.placeholder()
                pass
            elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 46, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 101, 102, 104, 105, 106, 108]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1195
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,149,self._ctx)
                if la_ == 1:
                    self.state = 1192
                    self.tableIdentifier()
                    self.state = 1193
                    self.match(HogQLParser.DOT)


                self.state = 1197
                self.nestedIdentifier()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class NestedIdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.IdentifierContext)
            else:
                return self.getTypedRuleContext(HogQLParser.IdentifierContext,i)


        def DOT(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.DOT)
            else:
                return self.getToken(HogQLParser.DOT, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_nestedIdentifier

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitNestedIdentifier" ):
                return visitor.visitNestedIdentifier(self)
            else:
                return visitor.visitChildren(self)




    def nestedIdentifier(self):

        localctx = HogQLParser.NestedIdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 140, self.RULE_nestedIdentifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1200
            self.identifier()
            self.state = 1205
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,151,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1201
                    self.match(HogQLParser.DOT)
                    self.state = 1202
                    self.identifier() 
                self.state = 1207
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,151,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TableExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser


        def getRuleIndex(self):
            return HogQLParser.RULE_tableExpr

     
        def copyFrom(self, ctx:ParserRuleContext):
            super().copyFrom(ctx)


    class TableExprTagContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def hogqlxTagElement(self):
            return self.getTypedRuleContext(HogQLParser.HogqlxTagElementContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprTag" ):
                return visitor.visitTableExprTag(self)
            else:
                return visitor.visitChildren(self)


    class TableExprIdentifierContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def tableIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.TableIdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprIdentifier" ):
                return visitor.visitTableExprIdentifier(self)
            else:
                return visitor.visitChildren(self)


    class TableExprPlaceholderContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def placeholder(self):
            return self.getTypedRuleContext(HogQLParser.PlaceholderContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprPlaceholder" ):
                return visitor.visitTableExprPlaceholder(self)
            else:
                return visitor.visitChildren(self)


    class TableExprSubqueryContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)
        def selectSetStmt(self):
            return self.getTypedRuleContext(HogQLParser.SelectSetStmtContext,0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprSubquery" ):
                return visitor.visitTableExprSubquery(self)
            else:
                return visitor.visitChildren(self)


    class TableExprAliasContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def tableExpr(self):
            return self.getTypedRuleContext(HogQLParser.TableExprContext,0)

        def alias(self):
            return self.getTypedRuleContext(HogQLParser.AliasContext,0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)
        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprAlias" ):
                return visitor.visitTableExprAlias(self)
            else:
                return visitor.visitChildren(self)


    class TableExprFunctionContext(TableExprContext):

        def __init__(self, parser, ctx:ParserRuleContext): # actually a HogQLParser.TableExprContext
            super().__init__(parser)
            self.copyFrom(ctx)

        def tableFunctionExpr(self):
            return self.getTypedRuleContext(HogQLParser.TableFunctionExprContext,0)


        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableExprFunction" ):
                return visitor.visitTableExprFunction(self)
            else:
                return visitor.visitChildren(self)



    def tableExpr(self, _p:int=0):
        _parentctx = self._ctx
        _parentState = self.state
        localctx = HogQLParser.TableExprContext(self, self._ctx, _parentState)
        _prevctx = localctx
        _startState = 142
        self.enterRecursionRule(localctx, 142, self.RULE_tableExpr, _p)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1217
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,152,self._ctx)
            if la_ == 1:
                localctx = HogQLParser.TableExprIdentifierContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx

                self.state = 1209
                self.tableIdentifier()
                pass

            elif la_ == 2:
                localctx = HogQLParser.TableExprFunctionContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 1210
                self.tableFunctionExpr()
                pass

            elif la_ == 3:
                localctx = HogQLParser.TableExprSubqueryContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 1211
                self.match(HogQLParser.LPAREN)
                self.state = 1212
                self.selectSetStmt()
                self.state = 1213
                self.match(HogQLParser.RPAREN)
                pass

            elif la_ == 4:
                localctx = HogQLParser.TableExprTagContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 1215
                self.hogqlxTagElement()
                pass

            elif la_ == 5:
                localctx = HogQLParser.TableExprPlaceholderContext(self, localctx)
                self._ctx = localctx
                _prevctx = localctx
                self.state = 1216
                self.placeholder()
                pass


            self._ctx.stop = self._input.LT(-1)
            self.state = 1227
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,154,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    if self._parseListeners is not None:
                        self.triggerExitRuleEvent()
                    _prevctx = localctx
                    localctx = HogQLParser.TableExprAliasContext(self, HogQLParser.TableExprContext(self, _parentctx, _parentState))
                    self.pushNewRecursionContext(localctx, _startState, self.RULE_tableExpr)
                    self.state = 1219
                    if not self.precpred(self._ctx, 3):
                        from antlr4.error.Errors import FailedPredicateException
                        raise FailedPredicateException(self, "self.precpred(self._ctx, 3)")
                    self.state = 1223
                    self._errHandler.sync(self)
                    token = self._input.LA(1)
                    if token in [20, 31, 41, 51, 108]:
                        self.state = 1220
                        self.alias()
                        pass
                    elif token in [6]:
                        self.state = 1221
                        self.match(HogQLParser.AS)
                        self.state = 1222
                        self.identifier()
                        pass
                    else:
                        raise NoViableAltException(self)
             
                self.state = 1229
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,154,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.unrollRecursionContexts(_parentctx)
        return localctx


    class TableFunctionExprContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def LPAREN(self):
            return self.getToken(HogQLParser.LPAREN, 0)

        def RPAREN(self):
            return self.getToken(HogQLParser.RPAREN, 0)

        def tableArgList(self):
            return self.getTypedRuleContext(HogQLParser.TableArgListContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_tableFunctionExpr

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableFunctionExpr" ):
                return visitor.visitTableFunctionExpr(self)
            else:
                return visitor.visitChildren(self)




    def tableFunctionExpr(self):

        localctx = HogQLParser.TableFunctionExprContext(self, self._ctx, self.state)
        self.enterRule(localctx, 144, self.RULE_tableFunctionExpr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1230
            self.identifier()
            self.state = 1231
            self.match(HogQLParser.LPAREN)
            self.state = 1233
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if (((_la) & ~0x3f) == 0 and ((1 << _la) & -36169677449216002) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 723944289947615231) != 0) or ((((_la - 131)) & ~0x3f) == 0 and ((1 << (_la - 131)) & 36887) != 0):
                self.state = 1232
                self.tableArgList()


            self.state = 1235
            self.match(HogQLParser.RPAREN)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TableIdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def nestedIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.NestedIdentifierContext,0)


        def databaseIdentifier(self):
            return self.getTypedRuleContext(HogQLParser.DatabaseIdentifierContext,0)


        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_tableIdentifier

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableIdentifier" ):
                return visitor.visitTableIdentifier(self)
            else:
                return visitor.visitChildren(self)




    def tableIdentifier(self):

        localctx = HogQLParser.TableIdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 146, self.RULE_tableIdentifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1240
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,156,self._ctx)
            if la_ == 1:
                self.state = 1237
                self.databaseIdentifier()
                self.state = 1238
                self.match(HogQLParser.DOT)


            self.state = 1242
            self.nestedIdentifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TableArgListContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def columnExpr(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.ColumnExprContext)
            else:
                return self.getTypedRuleContext(HogQLParser.ColumnExprContext,i)


        def COMMA(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.COMMA)
            else:
                return self.getToken(HogQLParser.COMMA, i)

        def getRuleIndex(self):
            return HogQLParser.RULE_tableArgList

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTableArgList" ):
                return visitor.visitTableArgList(self)
            else:
                return visitor.visitChildren(self)




    def tableArgList(self):

        localctx = HogQLParser.TableArgListContext(self, self._ctx, self.state)
        self.enterRule(localctx, 148, self.RULE_tableArgList)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1244
            self.columnExpr(0)
            self.state = 1249
            self._errHandler.sync(self)
            _alt = self._interp.adaptivePredict(self._input,157,self._ctx)
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt==1:
                    self.state = 1245
                    self.match(HogQLParser.COMMA)
                    self.state = 1246
                    self.columnExpr(0) 
                self.state = 1251
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,157,self._ctx)

            self.state = 1253
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==119:
                self.state = 1252
                self.match(HogQLParser.COMMA)


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class DatabaseIdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def identifier(self):
            return self.getTypedRuleContext(HogQLParser.IdentifierContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_databaseIdentifier

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitDatabaseIdentifier" ):
                return visitor.visitDatabaseIdentifier(self)
            else:
                return visitor.visitChildren(self)




    def databaseIdentifier(self):

        localctx = HogQLParser.DatabaseIdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 150, self.RULE_databaseIdentifier)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1255
            self.identifier()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FloatingLiteralContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def FLOATING_LITERAL(self):
            return self.getToken(HogQLParser.FLOATING_LITERAL, 0)

        def DOT(self):
            return self.getToken(HogQLParser.DOT, 0)

        def DECIMAL_LITERAL(self, i:int=None):
            if i is None:
                return self.getTokens(HogQLParser.DECIMAL_LITERAL)
            else:
                return self.getToken(HogQLParser.DECIMAL_LITERAL, i)

        def OCTAL_LITERAL(self):
            return self.getToken(HogQLParser.OCTAL_LITERAL, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_floatingLiteral

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFloatingLiteral" ):
                return visitor.visitFloatingLiteral(self)
            else:
                return visitor.visitChildren(self)




    def floatingLiteral(self):

        localctx = HogQLParser.FloatingLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 152, self.RULE_floatingLiteral)
        self._la = 0 # Token type
        try:
            self.state = 1265
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [109]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1257
                self.match(HogQLParser.FLOATING_LITERAL)
                pass
            elif token in [123]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1258
                self.match(HogQLParser.DOT)
                self.state = 1259
                _la = self._input.LA(1)
                if not(_la==110 or _la==111):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                pass
            elif token in [111]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1260
                self.match(HogQLParser.DECIMAL_LITERAL)
                self.state = 1261
                self.match(HogQLParser.DOT)
                self.state = 1263
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,159,self._ctx)
                if la_ == 1:
                    self.state = 1262
                    _la = self._input.LA(1)
                    if not(_la==110 or _la==111):
                        self._errHandler.recoverInline(self)
                    else:
                        self._errHandler.reportMatch(self)
                        self.consume()


                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class NumberLiteralContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def floatingLiteral(self):
            return self.getTypedRuleContext(HogQLParser.FloatingLiteralContext,0)


        def OCTAL_LITERAL(self):
            return self.getToken(HogQLParser.OCTAL_LITERAL, 0)

        def DECIMAL_LITERAL(self):
            return self.getToken(HogQLParser.DECIMAL_LITERAL, 0)

        def HEXADECIMAL_LITERAL(self):
            return self.getToken(HogQLParser.HEXADECIMAL_LITERAL, 0)

        def INF(self):
            return self.getToken(HogQLParser.INF, 0)

        def NAN_SQL(self):
            return self.getToken(HogQLParser.NAN_SQL, 0)

        def PLUS(self):
            return self.getToken(HogQLParser.PLUS, 0)

        def DASH(self):
            return self.getToken(HogQLParser.DASH, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_numberLiteral

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitNumberLiteral" ):
                return visitor.visitNumberLiteral(self)
            else:
                return visitor.visitChildren(self)




    def numberLiteral(self):

        localctx = HogQLParser.NumberLiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 154, self.RULE_numberLiteral)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1268
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==121 or _la==143:
                self.state = 1267
                _la = self._input.LA(1)
                if not(_la==121 or _la==143):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()


            self.state = 1276
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,162,self._ctx)
            if la_ == 1:
                self.state = 1270
                self.floatingLiteral()
                pass

            elif la_ == 2:
                self.state = 1271
                self.match(HogQLParser.OCTAL_LITERAL)
                pass

            elif la_ == 3:
                self.state = 1272
                self.match(HogQLParser.DECIMAL_LITERAL)
                pass

            elif la_ == 4:
                self.state = 1273
                self.match(HogQLParser.HEXADECIMAL_LITERAL)
                pass

            elif la_ == 5:
                self.state = 1274
                self.match(HogQLParser.INF)
                pass

            elif la_ == 6:
                self.state = 1275
                self.match(HogQLParser.NAN_SQL)
                pass


        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class LiteralContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def numberLiteral(self):
            return self.getTypedRuleContext(HogQLParser.NumberLiteralContext,0)


        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def NULL_SQL(self):
            return self.getToken(HogQLParser.NULL_SQL, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_literal

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitLiteral" ):
                return visitor.visitLiteral(self)
            else:
                return visitor.visitChildren(self)




    def literal(self):

        localctx = HogQLParser.LiteralContext(self, self._ctx, self.state)
        self.enterRule(localctx, 156, self.RULE_literal)
        try:
            self.state = 1281
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [45, 60, 109, 110, 111, 112, 121, 123, 143]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1278
                self.numberLiteral()
                pass
            elif token in [113]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1279
                self.match(HogQLParser.STRING_LITERAL)
                pass
            elif token in [62]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1280
                self.match(HogQLParser.NULL_SQL)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IntervalContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SECOND(self):
            return self.getToken(HogQLParser.SECOND, 0)

        def MINUTE(self):
            return self.getToken(HogQLParser.MINUTE, 0)

        def HOUR(self):
            return self.getToken(HogQLParser.HOUR, 0)

        def DAY(self):
            return self.getToken(HogQLParser.DAY, 0)

        def WEEK(self):
            return self.getToken(HogQLParser.WEEK, 0)

        def MONTH(self):
            return self.getToken(HogQLParser.MONTH, 0)

        def QUARTER(self):
            return self.getToken(HogQLParser.QUARTER, 0)

        def YEAR(self):
            return self.getToken(HogQLParser.YEAR, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_interval

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitInterval" ):
                return visitor.visitInterval(self)
            else:
                return visitor.visitChildren(self)




    def interval(self):

        localctx = HogQLParser.IntervalContext(self, self._ctx, self.state)
        self.enterRule(localctx, 158, self.RULE_interval)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1283
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 864692227968860160) != 0) or ((((_la - 73)) & ~0x3f) == 0 and ((1 << (_la - 73)) & 8724152577) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class KeywordContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def ALL(self):
            return self.getToken(HogQLParser.ALL, 0)

        def AND(self):
            return self.getToken(HogQLParser.AND, 0)

        def ANTI(self):
            return self.getToken(HogQLParser.ANTI, 0)

        def ANY(self):
            return self.getToken(HogQLParser.ANY, 0)

        def ARRAY(self):
            return self.getToken(HogQLParser.ARRAY, 0)

        def AS(self):
            return self.getToken(HogQLParser.AS, 0)

        def ASCENDING(self):
            return self.getToken(HogQLParser.ASCENDING, 0)

        def ASOF(self):
            return self.getToken(HogQLParser.ASOF, 0)

        def BETWEEN(self):
            return self.getToken(HogQLParser.BETWEEN, 0)

        def BOTH(self):
            return self.getToken(HogQLParser.BOTH, 0)

        def BY(self):
            return self.getToken(HogQLParser.BY, 0)

        def CASE(self):
            return self.getToken(HogQLParser.CASE, 0)

        def CAST(self):
            return self.getToken(HogQLParser.CAST, 0)

        def COHORT(self):
            return self.getToken(HogQLParser.COHORT, 0)

        def COLLATE(self):
            return self.getToken(HogQLParser.COLLATE, 0)

        def CROSS(self):
            return self.getToken(HogQLParser.CROSS, 0)

        def CUBE(self):
            return self.getToken(HogQLParser.CUBE, 0)

        def CURRENT(self):
            return self.getToken(HogQLParser.CURRENT, 0)

        def DATE(self):
            return self.getToken(HogQLParser.DATE, 0)

        def DESC(self):
            return self.getToken(HogQLParser.DESC, 0)

        def DESCENDING(self):
            return self.getToken(HogQLParser.DESCENDING, 0)

        def DISTINCT(self):
            return self.getToken(HogQLParser.DISTINCT, 0)

        def ELSE(self):
            return self.getToken(HogQLParser.ELSE, 0)

        def END(self):
            return self.getToken(HogQLParser.END, 0)

        def EXTRACT(self):
            return self.getToken(HogQLParser.EXTRACT, 0)

        def FINAL(self):
            return self.getToken(HogQLParser.FINAL, 0)

        def FIRST(self):
            return self.getToken(HogQLParser.FIRST, 0)

        def FOR(self):
            return self.getToken(HogQLParser.FOR, 0)

        def FOLLOWING(self):
            return self.getToken(HogQLParser.FOLLOWING, 0)

        def FROM(self):
            return self.getToken(HogQLParser.FROM, 0)

        def FULL(self):
            return self.getToken(HogQLParser.FULL, 0)

        def GROUP(self):
            return self.getToken(HogQLParser.GROUP, 0)

        def HAVING(self):
            return self.getToken(HogQLParser.HAVING, 0)

        def ID(self):
            return self.getToken(HogQLParser.ID, 0)

        def IS(self):
            return self.getToken(HogQLParser.IS, 0)

        def IF(self):
            return self.getToken(HogQLParser.IF, 0)

        def ILIKE(self):
            return self.getToken(HogQLParser.ILIKE, 0)

        def IN(self):
            return self.getToken(HogQLParser.IN, 0)

        def INNER(self):
            return self.getToken(HogQLParser.INNER, 0)

        def INTERVAL(self):
            return self.getToken(HogQLParser.INTERVAL, 0)

        def JOIN(self):
            return self.getToken(HogQLParser.JOIN, 0)

        def KEY(self):
            return self.getToken(HogQLParser.KEY, 0)

        def LAST(self):
            return self.getToken(HogQLParser.LAST, 0)

        def LEADING(self):
            return self.getToken(HogQLParser.LEADING, 0)

        def LEFT(self):
            return self.getToken(HogQLParser.LEFT, 0)

        def LIKE(self):
            return self.getToken(HogQLParser.LIKE, 0)

        def LIMIT(self):
            return self.getToken(HogQLParser.LIMIT, 0)

        def NOT(self):
            return self.getToken(HogQLParser.NOT, 0)

        def NULLS(self):
            return self.getToken(HogQLParser.NULLS, 0)

        def OFFSET(self):
            return self.getToken(HogQLParser.OFFSET, 0)

        def ON(self):
            return self.getToken(HogQLParser.ON, 0)

        def OR(self):
            return self.getToken(HogQLParser.OR, 0)

        def ORDER(self):
            return self.getToken(HogQLParser.ORDER, 0)

        def OUTER(self):
            return self.getToken(HogQLParser.OUTER, 0)

        def OVER(self):
            return self.getToken(HogQLParser.OVER, 0)

        def PARTITION(self):
            return self.getToken(HogQLParser.PARTITION, 0)

        def PRECEDING(self):
            return self.getToken(HogQLParser.PRECEDING, 0)

        def PREWHERE(self):
            return self.getToken(HogQLParser.PREWHERE, 0)

        def RANGE(self):
            return self.getToken(HogQLParser.RANGE, 0)

        def RETURN(self):
            return self.getToken(HogQLParser.RETURN, 0)

        def RIGHT(self):
            return self.getToken(HogQLParser.RIGHT, 0)

        def ROLLUP(self):
            return self.getToken(HogQLParser.ROLLUP, 0)

        def ROW(self):
            return self.getToken(HogQLParser.ROW, 0)

        def ROWS(self):
            return self.getToken(HogQLParser.ROWS, 0)

        def SAMPLE(self):
            return self.getToken(HogQLParser.SAMPLE, 0)

        def SELECT(self):
            return self.getToken(HogQLParser.SELECT, 0)

        def SEMI(self):
            return self.getToken(HogQLParser.SEMI, 0)

        def SETTINGS(self):
            return self.getToken(HogQLParser.SETTINGS, 0)

        def SUBSTRING(self):
            return self.getToken(HogQLParser.SUBSTRING, 0)

        def THEN(self):
            return self.getToken(HogQLParser.THEN, 0)

        def TIES(self):
            return self.getToken(HogQLParser.TIES, 0)

        def TIMESTAMP(self):
            return self.getToken(HogQLParser.TIMESTAMP, 0)

        def TOTALS(self):
            return self.getToken(HogQLParser.TOTALS, 0)

        def TRAILING(self):
            return self.getToken(HogQLParser.TRAILING, 0)

        def TRIM(self):
            return self.getToken(HogQLParser.TRIM, 0)

        def TRUNCATE(self):
            return self.getToken(HogQLParser.TRUNCATE, 0)

        def TO(self):
            return self.getToken(HogQLParser.TO, 0)

        def TOP(self):
            return self.getToken(HogQLParser.TOP, 0)

        def UNBOUNDED(self):
            return self.getToken(HogQLParser.UNBOUNDED, 0)

        def UNION(self):
            return self.getToken(HogQLParser.UNION, 0)

        def USING(self):
            return self.getToken(HogQLParser.USING, 0)

        def WHEN(self):
            return self.getToken(HogQLParser.WHEN, 0)

        def WHERE(self):
            return self.getToken(HogQLParser.WHERE, 0)

        def WINDOW(self):
            return self.getToken(HogQLParser.WINDOW, 0)

        def WITH(self):
            return self.getToken(HogQLParser.WITH, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_keyword

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitKeyword" ):
                return visitor.visitKeyword(self)
            else:
                return visitor.visitChildren(self)




    def keyword(self):

        localctx = HogQLParser.KeywordContext(self, self._ctx, self.state)
        self.enterRule(localctx, 160, self.RULE_keyword)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1285
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & -6665504612824399874) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 3775267732991) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class KeywordForAliasContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def DATE(self):
            return self.getToken(HogQLParser.DATE, 0)

        def FIRST(self):
            return self.getToken(HogQLParser.FIRST, 0)

        def ID(self):
            return self.getToken(HogQLParser.ID, 0)

        def KEY(self):
            return self.getToken(HogQLParser.KEY, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_keywordForAlias

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitKeywordForAlias" ):
                return visitor.visitKeywordForAlias(self)
            else:
                return visitor.visitChildren(self)




    def keywordForAlias(self):

        localctx = HogQLParser.KeywordForAliasContext(self, self._ctx, self.state)
        self.enterRule(localctx, 162, self.RULE_keywordForAlias)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1287
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 2254000985473024) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class AliasContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def IDENTIFIER(self):
            return self.getToken(HogQLParser.IDENTIFIER, 0)

        def keywordForAlias(self):
            return self.getTypedRuleContext(HogQLParser.KeywordForAliasContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_alias

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitAlias" ):
                return visitor.visitAlias(self)
            else:
                return visitor.visitChildren(self)




    def alias(self):

        localctx = HogQLParser.AliasContext(self, self._ctx, self.state)
        self.enterRule(localctx, 164, self.RULE_alias)
        try:
            self.state = 1291
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [108]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1289
                self.match(HogQLParser.IDENTIFIER)
                pass
            elif token in [20, 31, 41, 51]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1290
                self.keywordForAlias()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class IdentifierContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def IDENTIFIER(self):
            return self.getToken(HogQLParser.IDENTIFIER, 0)

        def interval(self):
            return self.getTypedRuleContext(HogQLParser.IntervalContext,0)


        def keyword(self):
            return self.getTypedRuleContext(HogQLParser.KeywordContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_identifier

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitIdentifier" ):
                return visitor.visitIdentifier(self)
            else:
                return visitor.visitChildren(self)




    def identifier(self):

        localctx = HogQLParser.IdentifierContext(self, self._ctx, self.state)
        self.enterRule(localctx, 166, self.RULE_identifier)
        try:
            self.state = 1296
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [108]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1293
                self.match(HogQLParser.IDENTIFIER)
                pass
            elif token in [21, 40, 58, 59, 73, 81, 100, 106]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1294
                self.interval()
                pass
            elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 38, 39, 41, 42, 43, 44, 46, 48, 49, 50, 51, 52, 53, 54, 56, 57, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 101, 102, 104, 105]:
                self.enterOuterAlt(localctx, 3)
                self.state = 1295
                self.keyword()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class EnumValueContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def string(self):
            return self.getTypedRuleContext(HogQLParser.StringContext,0)


        def EQ_SINGLE(self):
            return self.getToken(HogQLParser.EQ_SINGLE, 0)

        def numberLiteral(self):
            return self.getTypedRuleContext(HogQLParser.NumberLiteralContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_enumValue

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitEnumValue" ):
                return visitor.visitEnumValue(self)
            else:
                return visitor.visitChildren(self)




    def enumValue(self):

        localctx = HogQLParser.EnumValueContext(self, self._ctx, self.state)
        self.enterRule(localctx, 168, self.RULE_enumValue)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1298
            self.string()
            self.state = 1299
            self.match(HogQLParser.EQ_SINGLE)
            self.state = 1300
            self.numberLiteral()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class PlaceholderContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LBRACE(self):
            return self.getToken(HogQLParser.LBRACE, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_placeholder

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitPlaceholder" ):
                return visitor.visitPlaceholder(self)
            else:
                return visitor.visitChildren(self)




    def placeholder(self):

        localctx = HogQLParser.PlaceholderContext(self, self._ctx, self.state)
        self.enterRule(localctx, 170, self.RULE_placeholder)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1302
            self.match(HogQLParser.LBRACE)
            self.state = 1303
            self.columnExpr(0)
            self.state = 1304
            self.match(HogQLParser.RBRACE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StringContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def STRING_LITERAL(self):
            return self.getToken(HogQLParser.STRING_LITERAL, 0)

        def templateString(self):
            return self.getTypedRuleContext(HogQLParser.TemplateStringContext,0)


        def getRuleIndex(self):
            return HogQLParser.RULE_string

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitString" ):
                return visitor.visitString(self)
            else:
                return visitor.visitChildren(self)




    def string(self):

        localctx = HogQLParser.StringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 172, self.RULE_string)
        try:
            self.state = 1308
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [113]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1306
                self.match(HogQLParser.STRING_LITERAL)
                pass
            elif token in [146]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1307
                self.templateString()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class TemplateStringContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def QUOTE_SINGLE_TEMPLATE(self):
            return self.getToken(HogQLParser.QUOTE_SINGLE_TEMPLATE, 0)

        def QUOTE_SINGLE(self):
            return self.getToken(HogQLParser.QUOTE_SINGLE, 0)

        def stringContents(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.StringContentsContext)
            else:
                return self.getTypedRuleContext(HogQLParser.StringContentsContext,i)


        def getRuleIndex(self):
            return HogQLParser.RULE_templateString

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitTemplateString" ):
                return visitor.visitTemplateString(self)
            else:
                return visitor.visitChildren(self)




    def templateString(self):

        localctx = HogQLParser.TemplateStringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 174, self.RULE_templateString)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1310
            self.match(HogQLParser.QUOTE_SINGLE_TEMPLATE)
            self.state = 1314
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==161 or _la==162:
                self.state = 1311
                self.stringContents()
                self.state = 1316
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 1317
            self.match(HogQLParser.QUOTE_SINGLE)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StringContentsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def STRING_ESCAPE_TRIGGER(self):
            return self.getToken(HogQLParser.STRING_ESCAPE_TRIGGER, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def STRING_TEXT(self):
            return self.getToken(HogQLParser.STRING_TEXT, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_stringContents

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitStringContents" ):
                return visitor.visitStringContents(self)
            else:
                return visitor.visitChildren(self)




    def stringContents(self):

        localctx = HogQLParser.StringContentsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 176, self.RULE_stringContents)
        try:
            self.state = 1324
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [162]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1319
                self.match(HogQLParser.STRING_ESCAPE_TRIGGER)
                self.state = 1320
                self.columnExpr(0)
                self.state = 1321
                self.match(HogQLParser.RBRACE)
                pass
            elif token in [161]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1323
                self.match(HogQLParser.STRING_TEXT)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class FullTemplateStringContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def QUOTE_SINGLE_TEMPLATE_FULL(self):
            return self.getToken(HogQLParser.QUOTE_SINGLE_TEMPLATE_FULL, 0)

        def EOF(self):
            return self.getToken(HogQLParser.EOF, 0)

        def stringContentsFull(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(HogQLParser.StringContentsFullContext)
            else:
                return self.getTypedRuleContext(HogQLParser.StringContentsFullContext,i)


        def getRuleIndex(self):
            return HogQLParser.RULE_fullTemplateString

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitFullTemplateString" ):
                return visitor.visitFullTemplateString(self)
            else:
                return visitor.visitChildren(self)




    def fullTemplateString(self):

        localctx = HogQLParser.FullTemplateStringContext(self, self._ctx, self.state)
        self.enterRule(localctx, 178, self.RULE_fullTemplateString)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 1326
            self.match(HogQLParser.QUOTE_SINGLE_TEMPLATE_FULL)
            self.state = 1330
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==163 or _la==164:
                self.state = 1327
                self.stringContentsFull()
                self.state = 1332
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 1333
            self.match(HogQLParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class StringContentsFullContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def FULL_STRING_ESCAPE_TRIGGER(self):
            return self.getToken(HogQLParser.FULL_STRING_ESCAPE_TRIGGER, 0)

        def columnExpr(self):
            return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0)


        def RBRACE(self):
            return self.getToken(HogQLParser.RBRACE, 0)

        def FULL_STRING_TEXT(self):
            return self.getToken(HogQLParser.FULL_STRING_TEXT, 0)

        def getRuleIndex(self):
            return HogQLParser.RULE_stringContentsFull

        def accept(self, visitor:ParseTreeVisitor):
            if hasattr( visitor, "visitStringContentsFull" ):
                return visitor.visitStringContentsFull(self)
            else:
                return visitor.visitChildren(self)




    def stringContentsFull(self):

        localctx = HogQLParser.StringContentsFullContext(self, self._ctx, self.state)
        self.enterRule(localctx, 180, self.RULE_stringContentsFull)
        try:
            self.state = 1340
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [164]:
                self.enterOuterAlt(localctx, 1)
                self.state = 1335
                self.match(HogQLParser.FULL_STRING_ESCAPE_TRIGGER)
                self.state = 1336
                self.columnExpr(0)
                self.state = 1337
                self.match(HogQLParser.RBRACE)
                pass
            elif token in [163]:
                self.enterOuterAlt(localctx, 2)
                self.state = 1339
                self.match(HogQLParser.FULL_STRING_TEXT)
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx



    def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int):
        if self._predicates == None:
            self._predicates = dict()
        self._predicates[41] = self.joinExpr_sempred
        self._predicates[61] = self.columnExpr_sempred
        self._predicates[71] = self.tableExpr_sempred
        pred = self._predicates.get(ruleIndex, None)
        if pred is None:
            raise Exception("No predicate with index:" + str(ruleIndex))
        else:
            return pred(localctx, predIndex)

    def joinExpr_sempred(self, localctx:JoinExprContext, predIndex:int):
            if predIndex == 0:
                return self.precpred(self._ctx, 3)
         

            if predIndex == 1:
                return self.precpred(self._ctx, 4)
         

    def columnExpr_sempred(self, localctx:ColumnExprContext, predIndex:int):
            if predIndex == 2:
                return self.precpred(self._ctx, 19)
         

            if predIndex == 3:
                return self.precpred(self._ctx, 18)
         

            if predIndex == 4:
                return self.precpred(self._ctx, 17)
         

            if predIndex == 5:
                return self.precpred(self._ctx, 15)
         

            if predIndex == 6:
                return self.precpred(self._ctx, 13)
         

            if predIndex == 7:
                return self.precpred(self._ctx, 12)
         

            if predIndex == 8:
                return self.precpred(self._ctx, 11)
         

            if predIndex == 9:
                return self.precpred(self._ctx, 10)
         

            if predIndex == 10:
                return self.precpred(self._ctx, 31)
         

            if predIndex == 11:
                return self.precpred(self._ctx, 30)
         

            if predIndex == 12:
                return self.precpred(self._ctx, 26)
         

            if predIndex == 13:
                return self.precpred(self._ctx, 25)
         

            if predIndex == 14:
                return self.precpred(self._ctx, 24)
         

            if predIndex == 15:
                return self.precpred(self._ctx, 23)
         

            if predIndex == 16:
                return self.precpred(self._ctx, 22)
         

            if predIndex == 17:
                return self.precpred(self._ctx, 21)
         

            if predIndex == 18:
                return self.precpred(self._ctx, 16)
         

            if predIndex == 19:
                return self.precpred(self._ctx, 9)
         

    def tableExpr_sempred(self, localctx:TableExprContext, predIndex:int):
            if predIndex == 20:
                return self.precpred(self._ctx, 3)
         




